git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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-1s
And I didn't want to change parse-options.c ;-)
Any other comments?
Regards,
  Stephan
-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F
Previous: Michele BallabioNext: Michele Ballabio
Message 4 of 7 in “api-parse-options.txt: Introduce documentation for parse options API”
  1. 1/2 api-parse-options.txt: Introduce documentation for parse options APIStephan Beyer, Jun 22, 2008
  2. 2/2 Extend parse-options test suiteStephan Beyer, Jun 22, 2008
  3. Michele BallabioJun 22, 2008
  4. Stephan BeyerJun 22, 2008
  5. parse-options.c: fix documentation syntax of optional argumentsMichele Ballabio, Jun 22, 2008
  6. 1/2 api-parse-options.txt: Introduce documentation for parse options APIStephan Beyer, Jun 22, 2008
  7. 2/2 Extend parse-options test suiteStephan Beyer, Jun 22, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.