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

Re: [PATCH 1/6] gitopt: a new command-line option parser for git

From
THTimo Hirvonen <tihirvon@gmail.com>
Date
May 9, 2006, 21:08 UTC
Message-ID
<20060510000826.1a708c03.tihirvon@gmail.com>
In-Reply-To
<7vlktb2ayy.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 12 quoted lines
> Timo Hirvonen <tihirvon@gmail.com> writes:
> 
> > I think optional arguments are still confusing.  We could support both
> > -C (no args) and -C=20 syntax.
> 
> Actually, optional numeric arguments are the norm not exception.
> Think of "diff -u" vs "diff -u20" for example.  Also I think it
> is conventional not to use = for single-letter single-dash
> options, so -C (no args -- use the default number of the
> implementation whatever it is) and -C20 (the same behaviour in
> principle as -C, but use my number instead of the default) are
> sane, while -C=20 _is_ odd.

OK, if we don't support bundling flags at all then -x=y and -xy would do the same thing and pickaxe's -Stext would work too. But we could not make option flag parsing global then (-S=value -> search "=value" or "value"?).

Maybe we should just change -Stext to -S=text or -S text.
Better to support only -x=y or -x y, not both.
> Having said that, I think abbreviating -u20 -n -r to -u20nr
> going too far
Yes
> (-nru20 would be palatable perhaps),
No :)
-- 
http://onion.dynserv.net/~timo/
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 13 in “gitopt: a new command-line option parser for git”
  1. 1/6 gitopt: a new command-line option parser for gitEric Wong, May 9, 2006
  2. 2/6 update-index: convert to using gitoptEric Wong, May 9, 2006
  3. 3/6 ls-tree: convert to gitoptEric Wong, May 9, 2006
  4. 4/6 ls-files: convert to using gitoptEric Wong, May 9, 2006
  5. Timo HirvonenMay 9, 2006
  6. Junio C HamanoMay 9, 2006
  7. Eric WongMay 9, 2006
  8. Eric WongMay 9, 2006
  9. Timo HirvonenMay 9, 2006
  10. Junio C HamanoMay 9, 2006
  11. Timo HirvonenMay 9, 2006
  12. Junio C HamanoMay 9, 2006
  13. Timo HirvonenMay 9, 2006

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.