aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-12-22 17:54:51 -0500
committerB. Watson <urchlay@slackware.uk>2024-12-22 17:54:51 -0500
commit9dc55bbd886e5a7de8e7ee020e643b536f377667 (patch)
treeb14042b776c34d97c1e7a12dfc0dbf3b9b19011c
parent69816aaa655b4028d5bac272868c4c932d8cc33f (diff)
downloaduxd-9dc55bbd886e5a7de8e7ee020e643b536f377667.tar.gz
document -- in man and --help
-rw-r--r--mkusage.pl3
-rw-r--r--usage.c1
-rw-r--r--uxd.18
-rw-r--r--uxd.rst6
4 files changed, 17 insertions, 1 deletions
diff --git a/mkusage.pl b/mkusage.pl
index 0506d8c..446beab 100644
--- a/mkusage.pl
+++ b/mkusage.pl
@@ -4,7 +4,8 @@ print "char *usage_opts[] = {\n";
while(<>) {
chomp;
- if(/^-[a-zA-Z\d]/) {
+ next if /^---/;
+ if(/^-[-a-zA-Z\d]/) {
$opt = $_;
next;
}
diff --git a/usage.c b/usage.c
index cf7e1da..b8a4428 100644
--- a/usage.c
+++ b/usage.c
@@ -1,4 +1,5 @@
char *usage_opts[] = {
+ " --: no more options.",
" -1: don't alternate colors for normal characters.",
" -b: bold color output.",
" -c nnnnn: colors (2 to 5 digits, 0 to 7).",
diff --git a/uxd.1 b/uxd.1
index efb439f..1e55777 100644
--- a/uxd.1
+++ b/uxd.1
@@ -69,6 +69,14 @@ as \fIK\fP, \fIM\fP, and \fIG\fP for power\-of\-10 based (e.g. \fI1K\fP is 1000
.
.INDENT 0.0
.TP
+.B \-\-
+No more options; whatever comes after this is a filename, even if it
+begins with \fB\-\fP\&.
+.UNINDENT
+.\" no more options.
+.
+.INDENT 0.0
+.TP
.B \-1
Don\(aqt alternate colors for normal characters.
.UNINDENT
diff --git a/uxd.rst b/uxd.rst
index 16a6a37..f1fdb98 100644
--- a/uxd.rst
+++ b/uxd.rst
@@ -58,6 +58,12 @@ as *K*, *M*, and *G* for power-of-10 based (e.g. *1K* is 1000 bytes).
.. the comments are turned into the --help message by mkusage.pl.
+--
+ No more options; whatever comes after this is a filename, even if it
+ begins with **-**.
+
+.. no more options.
+
-1
Don't alternate colors for normal characters.