Re: [PATCH 1/2] api-parse-options.txt: Introduce documentation for parse options API
- From
Stephan Beyer <s-beyer@gmx.net>
- Date
- Jun 22, 2008, 13:45 UTC
- Message-ID
- <20080622134550.GA5279@leksak.fem-net>
- In-Reply-To
- <200806221449.08307.barra_cuda@katamail.com>
Show 7 quoted lines
> > +`PARSE_OPT_KEEP_DASHDASH`:: > > + Usually long options (`\--long-opt`) are boiled down to their > > + short option equivalent, if available. > > + Using this flag, long options are kept. > > No: PARSE_OPT_KEEP_DASHDASH keeps the "--" that usually separates options > from files, as in
Eh, right, of course! What I wrote doesn't make any sense. ;-)
Show 7 quoted lines
> > +`OPT__ABBREV(&int_var)`:: > > + Add `\--abbrev [<n>]`. > > better: > + Add `\--abbrev[=<n>]`. > > since the <n> is optional.
That's right and I also expected that print_usage_with_options() would do so, since the other variant is ambiguous, BUT:
$ ./test-parse-options -h 2>&1 | grep abbrev
--abbrev [<n>] use <n> digits to display SHA-1sAnd I didn't want to change parse-options.c ;-)
Any other comments?
Regards, Stephan
-- Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F