From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Add --help option in usage
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <20191211142449.GA2993@delia> (raw)
Hi,
The option -? (short for --help) shows the usage, but is itself not listed in
the usage:
...
$ dwz -?
dwz: Usage:
dwz [-v] [-q] [-l <COUNT|none>] [-L <COUNT|none>] [-h] [-m COMMONFILE] \
[-M NAME | -r] [FILES]
dwz [-v] [-q] [-l <COUNT|none>] [-L <COUNT|none>] -o OUTFILE FILE
...
Furthermore, the -v option is listed as common option, but like -?, stops
regular processing after printing a message.
List these two together in a new usage line, and show them as exclusive to
indicate that only one can have effect:
...
dwz [-q] [-l <COUNT|none>] [-L <COUNT|none>] [-h] [-m COMMONFILE] \
[-M NAME | -r] [FILES]
dwz [-q] [-l <COUNT|none>] [-L <COUNT|none>] -o OUTFILE FILE
dwz [ -v | -? ]
...
Committed to trunk.
Thanks,
- Tom
Add --help option in usage
2019-12-11 Tom de Vries <tdevries@suse.de>
* dwz.c (COMMON_OPTS): Drop -v.
(usage): Add line advertising -? and -v.
---
dwz.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dwz.c b/dwz.c
index 900bfc3..d83a1cf 100644
--- a/dwz.c
+++ b/dwz.c
@@ -13363,11 +13363,12 @@ static struct option dwz_options[] =
static void
usage (void)
{
-#define COMMON_OPTS "[-v] [-q] [-l <COUNT|none>] [-L <COUNT|none>]"
+#define COMMON_OPTS "[-q] [-l <COUNT|none>] [-L <COUNT|none>]"
error (1, 0,
"Usage:\n"
" dwz " COMMON_OPTS " [-h] [-m COMMONFILE] [-M NAME | -r] [FILES]\n"
" dwz " COMMON_OPTS " -o OUTFILE FILE\n"
+ " dwz [ -v | -? ]\n"
#undef COMMON_OPTS
#if DEVEL
"Development options:\n"
reply other threads:[~2019-12-11 14:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191211142449.GA2993@delia \
--to=tdevries@suse.de \
--cc=dwz@sourceware.org \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).