Re: [PATCH 5/7] parse-opt: fake short strings for callers to believe in.
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jun 24, 2008, 17:20 UTC
- Message-ID
- <alpine.LFD.1.10.0806241019370.2926@woody.linux-foundation.org>
- In-Reply-To
- <1214298732-6247-6-git-send-email-madcoder@debian.org>
On Tue, 24 Jun 2008, Pierre Habouzit wrote:
Show 7 quoted lines
> > If we begin to parse -abc and that the parser knew about -a and -b, it > will fake a -c switch for the caller to deal with. > > Of course in the case of -acb (supposing -c is not taking an argument) the > caller will have to be especially clever to do the same thing. We could > think about exposing an API to do so if it's really needed, but oh well...
Well, if the other parser is _also_ parse_options() (ie you just cascade them incrementally in a loop), then the other parser should get it right automatically. No?
Linus