aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-12-14 05:41:08 -0500
committerB. Watson <urchlay@slackware.uk>2024-12-14 05:41:08 -0500
commit546a27e2f2b3f516886dfd6b2d6cf21b946c59ad (patch)
treebb540bf10155204d0faa2b869c461451530932b7
parent7c4f03d63bcc3552c0833fe07569936ce77dd154 (diff)
downloaduxd-546a27e2f2b3f516886dfd6b2d6cf21b946c59ad.tar.gz
document all options (including unimplemented ones).
-rw-r--r--uxd.147
-rw-r--r--uxd.rst45
2 files changed, 76 insertions, 16 deletions
diff --git a/uxd.1 b/uxd.1
index 69a41cb..bf7dafa 100644
--- a/uxd.1
+++ b/uxd.1
@@ -51,10 +51,28 @@ terminal. It\(aqs assumed that the terminal supports ANSI\-style color and
UTF\-8. See \fBTERMINAL SUPPORT\fP below. If you want to pipe the output
to a pager, try \fBless \-R\fP\&.
.SH OPTIONS
+.sp
+These options can be used on the command line, and/or in the
+\fBUXD_OPTS\fP environment variable. The command line takes precedence
+over the environment.
.INDENT 0.0
.TP
-.B \-r
-Highlight multi\-byte sequences in reverse video, in the hex output.
+.B \-b
+Bold output. This may be more or less readable, depending on your
+terminal and its color settings. Ignored if \fB\-m\fP given.
+NOT IMPLEMENTED YET.
+.TP
+.BI \-c \ nnnn
+Set the colors to use. Must be 2 to 4 digits, from 0 to 7. These are
+standard ANSI colors. The first 2 are the alternating colors for
+normal characters, the 3rd digit (optional) is the color for non\-printable
+and space characters, and the 4th (optional) is for invalid UTF\-8
+sequences. Default: \fB2351\fP\&. This option also disables a prior \fB\-m\fP
+option.
+NOT IMPLEMENTED YET.
+.TP
+.B \-h\fP,\fB \-\-help
+Print built\-in usage message and exit.
.TP
.B \-m
Monochrome mode. Uses underline, bold, reverse video instead of color.
@@ -67,6 +85,10 @@ Add this amount to the hex offsets (left column). May be negative,
if you can think of a reason to want it to be. Can be given in
decimal, hex (with \fI0x\fP prefix), or octal (with \fI0\fP prefix).
.TP
+.B \-r
+Highlight multi\-byte sequences in reverse video, in the hex
+output. Ignored if \fB\-m\fP given.
+.TP
.BI \-s \ position
Seek in input before starting to dump. Positive \fIposition\fP means
seek from the start of the input. Negative \fIposition\fP only works
@@ -76,9 +98,6 @@ NOT IMPLEMENTED YET.
.B \-u
Use uppercase hex digits A\-F. Default is lowercase.
.TP
-.B \-h\fP,\fB \-\-help
-Print built\-in usage message and exit.
-.TP
.B \-v\fP,\fB \-\-version
Print version number and exit.
.UNINDENT
@@ -218,10 +237,22 @@ specifically a problem with \fBuxd\fP\&.
\fBuxd\fP doesn\(aqt read any files other than the input file, and doesn\(aqt write to
any files other than standard output. There\(aqs no config file.
.SH ENVIRONMENT
+.INDENT 0.0
+.TP
+.B \fBUXD_OPTS\fP
+If this is set, its value is treated as a set of options, which
+get applied before any command\-line options.
+NOT IMPLEMENTED YET.
+.TP
+.B \fBNO_COLOR\fP
+If this is set (to any value), \fBuxd\fP runs in monochrome mode, just
+as though the \fB\-m\fP option were given. This variable is also
+respected by \fBxxd\fP\&.
+NOT IMPLEMENTED YET.
+.UNINDENT
.sp
-\fBuxd\fP doesn\(aqt read anything from the environment. It\(aqs \fInot\fP necessary to
-have a UTF\-8 locale set in e.g. \fBLANG\fP or \fBLC_ALL\fP\&. Also, the \fBTERM\fP
-variable is not used.
+It\(aqs \fInot\fP necessary to have a UTF\-8 locale set in e.g. \fBLANG\fP or
+\fBLC_ALL\fP\&. Also, the \fBTERM\fP variable is not used.
.SH EXIT STATUS
.sp
Zero for success, non\-zero for failure.
diff --git a/uxd.rst b/uxd.rst
index 26cab62..0ffcd28 100644
--- a/uxd.rst
+++ b/uxd.rst
@@ -42,8 +42,26 @@ to a pager, try **less -R**.
OPTIONS
=======
--r
- Highlight multi-byte sequences in reverse video, in the hex output.
+These options can be used on the command line, and/or in the
+**UXD_OPTS** environment variable. The command line takes precedence
+over the environment.
+
+-b
+ Bold output. This may be more or less readable, depending on your
+ terminal and its color settings. Ignored if **-m** given.
+ NOT IMPLEMENTED YET.
+
+-c nnnn
+ Set the colors to use. Must be 2 to 4 digits, from 0 to 7. These are
+ standard ANSI colors. The first 2 are the alternating colors for
+ normal characters, the 3rd digit (optional) is the color for non-printable
+ and space characters, and the 4th (optional) is for invalid UTF-8
+ sequences. Default: **2351**. This option also disables a prior **-m**
+ option.
+ NOT IMPLEMENTED YET.
+
+-h, --help
+ Print built-in usage message and exit.
-m
Monochrome mode. Uses underline, bold, reverse video instead of color.
@@ -56,6 +74,10 @@ OPTIONS
if you can think of a reason to want it to be. Can be given in
decimal, hex (with *0x* prefix), or octal (with *0* prefix).
+-r
+ Highlight multi-byte sequences in reverse video, in the hex
+ output. Ignored if **-m** given.
+
-s position
Seek in input before starting to dump. Positive *position* means
seek from the start of the input. Negative *position* only works
@@ -65,9 +87,6 @@ OPTIONS
-u
Use uppercase hex digits A-F. Default is lowercase.
--h, --help
- Print built-in usage message and exit.
-
-v, --version
Print version number and exit.
@@ -205,9 +224,19 @@ any files other than standard output. There's no config file.
ENVIRONMENT
===========
-**uxd** doesn't read anything from the environment. It's *not* necessary to
-have a UTF-8 locale set in e.g. **LANG** or **LC_ALL**. Also, the **TERM**
-variable is not used.
+**UXD_OPTS**
+ If this is set, its value is treated as a set of options, which
+ get applied before any command-line options.
+ NOT IMPLEMENTED YET.
+
+**NO_COLOR**
+ If this is set (to any value), **uxd** runs in monochrome mode, just
+ as though the **-m** option were given. This variable is also
+ respected by **xxd**.
+ NOT IMPLEMENTED YET.
+
+It's *not* necessary to have a UTF-8 locale set in e.g. **LANG** or
+**LC_ALL**. Also, the **TERM** variable is not used.
EXIT STATUS
===========