coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Priority of --help


From: Eric Blake
Subject: Re: Priority of --help
Date: Wed, 21 Oct 2015 07:50:04 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]