bug#10253: mention +FORMAT in ls time style reminder help blurb
From:
Eric Blake
Subject:
bug#10253: mention +FORMAT in ls time style reminder help blurb
Date:
Fri, 09 Dec 2011 14:30:14 -0700
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0
On 12/09/2011 12:22 PM, Jim Meyering wrote:
> address@hidden wrote:
>> $ ls -t1 --time-style=%c -og
>> ls: invalid argument `%c' for `time style'
>> Valid arguments are:
>> - `full-iso'
>> - `long-iso'
>> - `iso'
>> - `locale' <-------------you forgot to also mention "+FORMAT"
>> Try `ls --help' for more information.
>> $ ls -t1 --time-style=+%c -og
>
> Thanks for the report.
> However, that doesn't lend itself well to a clean fix, since +FORMAT
> is not a literal string option argument like the others, and currently
> that diagnostic is generated automatically based on the list of literal
> strings.
I agree that listing `+FORMAT' doesn't fit the pattern. But maybe we
can make it obvious that there is a non-literal possibility, as well as
also mentioning the posix- prefix already covered by 'ls --help':
Valid arguments are:
- `[posix-]full-iso'
- `[posix-]long-iso'
- `[posix-]iso'
- `[posix-]locale'
- `+' followed by formatting directives
Try `ls --help' for more information.
Also, I noticed that 'ls --help' uses FORMAT in the text for
--time-style, but doesn't define FORMAT anywhere else; we probably ought
to have a one-line sentence at the bottom, after the paragraph on SIZE,
stating:
See `date --help' for valid directives that may appear in FORMAT.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc Description: OpenPGP digital signature