Re: Spaces in synopses of commands (was: [PATCH v3] time.1: ffix)

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

 



On 2023-07-30 18:13, G. Branden Robinson wrote:
> Hi Alex,
> 
> At 2023-07-30T17:49:28+0200, Alejandro Colomar wrote:
>> I agree that having a space between an option and its argument improves
>> readability.  However, between a positional argument and the ellipsis
>> that marks that it can appear multiple times, I don't think the same
>> reasoning applies; at least not so obviously.
>>
>> I'm referring to  [file ...] vs  [file...].
> 
> Oh.  The point of this is that the arguments (operands in this case)
> remain whitespace-delimited, where it might not be the case for a
> repeatable single-letter option.
> 
> foobar [-adX] [-v...] file ...
> foobar [-h | --help]
> 
>   -v...  Be more verbose.  The option letter can be repeated, increasing
>          the verbosity level.
> 
> "[-v ...]" would imply that only "-v -v -v" is allowed, instead of
> "-vvv".
> 
> I think this is a matter of achieving an accurate and unambiguous
> synopsis grammar.

Thanks; that kind of objective reasoning is what I wanted.  Would you
mind stating it in the commit message for posterity?  :-)

Cheers,
Alex

> 
> Regards,
> Branden

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux