From 9dc55bbd886e5a7de8e7ee020e643b536f377667 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 22 Dec 2024 17:54:51 -0500 Subject: document -- in man and --help --- mkusage.pl | 3 ++- usage.c | 1 + uxd.1 | 8 ++++++++ uxd.rst | 6 ++++++ 4 files changed, 17 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3