GNU bug report logs -
#44959
date error message should say -I
Previous Next
Full log
Message #11 received at 44959 <at> debbugs.gnu.org (full text, mbox):
On 30/11/2020 01:40 pm, Bernhard Voelker wrote:
> On 11/30/20 2:13 PM, 積丹尼 Dan Jacobson wrote:
>> $ date -I=seconds
>> date: invalid argument ‘=seconds’ for ‘--iso-8601’
>
> Hmm, first of all, 'date' 8.32 outputs more than the above:
>
> $ date -I=seconds
> date: invalid argument '=seconds' for '--iso-8601'
> Valid arguments are:
> - 'hours'
> - 'minutes'
> - 'date'
> - 'seconds'
> - 'ns'
> Try 'date --help' for more information.
>
>> Hey, that is a valid argument for --iso-8601. (But not for -I, so say
>> that instead.)
> ...
>> date (GNU coreutils) 8.32
>
>>From the above error message and from the --help output, one can see that
> the -I option does not require the argument to be appended with "=FMT" but
> just "FMT":
>
> $ date --help | grep -- -I
> -I[FMT], --iso-8601[=FMT] output date/time in ISO 8601 format.
>
> So, I'd say 'date' works as expected:
>
> $ date -Iseconds
> 2020-11-30T14:38:35+01:00
>
> Have a nice day,
> Berny
>
>
>
>
Is -I the only option that doesn't accept a space separator between it
and its argument? Is that because it doesn't require an argument?
Could/Should the argument after -I be parsed and used if it is one of
date hours minutes seconds ns? (Could it also parse for mins secs?) But
used as a separate option if not parsed as an argument?
Is this too difficult?
Cheers
--
Chris Elvidge
This bug report was last modified 4 years and 195 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.