On 10/21/2015 07:17 AM, Eric Blake wrote: > On 10/21/2015 07:04 AM, Leslie S Satenstein wrote: >> Hi Eric >> I like your findings. Can you see any wrong reason why the parser should >> not first scan for -- arguments? > > That's what the parser already does. The question is whether the scan > should be one-pass or two-pass. > >> I would like to see something like " ls -l * --help " tell me >> what "ls -l" is about? Regards > > No, be careful. I specifically note that I _like_ the behavior of > options eating their arguments. 'ls -l * --help' will NOT always output > help, if the last file in the expansion of '*' resembles an option that > requires an argument. I'm only requesting whether 'ls -l * --help > --help' is a guaranteed way to get help.
Actually, that's not true either; if '*' expands to include a literal file '--', then nothing after that point will be interpreted as an option. But either case (a file looking like option name that requires an argument, or a file looking like '--') is rare, so in general, yes, putting --help after * usually works. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
