GNU bug report logs -
#44959
date error message should say -I
Previous Next
To reply to this bug, email your comments to 44959 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#44959
; Package
coreutils
.
(Mon, 30 Nov 2020 13:15:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Mon, 30 Nov 2020 13:15:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
$ date -I=seconds
date: invalid argument ‘=seconds’ for ‘--iso-8601’
Hey, that is a valid argument for --iso-8601. (But not for -I, so say
that instead.)
Here is a real invalid argument:
$ date --iso-8601=secondsz
date: invalid argument ‘secondsz’ for ‘--iso-8601’
date (GNU coreutils) 8.32
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#44959
; Package
coreutils
.
(Mon, 30 Nov 2020 13:41:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 44959 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#44959
; Package
coreutils
.
(Mon, 30 Nov 2020 14:52:01 GMT)
Full text and
rfc822 format available.
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
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#44959
; Package
coreutils
.
(Mon, 30 Nov 2020 15:22:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 44959 <at> debbugs.gnu.org (full text, mbox):
Well OK, but when and when not to use the "=" is not revealed by the
otherwise detailed error messages. So unless the user checks the manual,
they will never "get it".
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#44959
; Package
coreutils
.
(Mon, 30 Nov 2020 17:23:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 44959 <at> debbugs.gnu.org (full text, mbox):
On 30/11/2020 15:21, 積丹尼 Dan Jacobson wrote:
> Well OK, but when and when not to use the "=" is not revealed by the
> otherwise detailed error messages. So unless the user checks the manual,
> they will never "get it".
If we were to recognize "-I seconds",
it should just be for diagnostic help.
I.e. we should minimize the combinations of valid inputs,
for compatibility, consistency, and simplicity.
I'll have a look at improving diagnostics in this area.
cheers,
Pádraig
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#44959
; Package
coreutils
.
(Mon, 30 Nov 2020 21:33:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 44959 <at> debbugs.gnu.org (full text, mbox):
On 30/11/2020 17:22, Pádraig Brady wrote:
> On 30/11/2020 15:21, 積丹尼 Dan Jacobson wrote:
>> Well OK, but when and when not to use the "=" is not revealed by the
>> otherwise detailed error messages. So unless the user checks the manual,
>> they will never "get it".
>
> If we were to recognize "-I seconds",
> it should just be for diagnostic help.
> I.e. we should minimize the combinations of valid inputs,
> for compatibility, consistency, and simplicity.
>
> I'll have a look at improving diagnostics in this area.
This is one of the reasons we avoid args to short options,
and new short options in general.
Optional args to short options are rare in coreutils:
$ grep -- '-[[:alpha:]]\[[A-Z]' man/*.1 | sed 's/,.*//'
man/date.1:\fB\-I[FMT]\fR
man/od.1:\fB\-w[BYTES]\fR
man/pr.1:\fB\-e[CHAR[WIDTH]]\fR
man/pr.1:\fB\-i[CHAR[WIDTH]]\fR
man/pr.1:\fB\-n[SEP[DIGITS]]\fR
man/pr.1:\fB\-s[CHAR]\fR
man/pr.1:\fB\-s[CHAR]\fR turns off line truncation of all 3 column
man/pr.1:\fB\-S[STRING]\fR
Non option args to short options as less rare:
$ grep 'B\\-[^\].*=' man/*.1
For my reference, if we were to give explicit diagnosis of the leading '='.
we would need to update xstrtol_fatal, XARGMATCH, operand2sig, set_fields, ...
cheers,
Pádraig
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#44959
; Package
coreutils
.
(Tue, 01 Dec 2020 19:58:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 44959 <at> debbugs.gnu.org (full text, mbox):
Hi Padraig,
On 11/30/20 10:31 PM, Pádraig Brady wrote:
> For my reference, if we were to give explicit diagnosis of the leading '='.
> we would need to update xstrtol_fatal, XARGMATCH, operand2sig, set_fields, ...
I'd also rather keep it like it is, but if we change something:
we could advance past the '=' character in the option arg value
... at least in the case where only enumeration or numeric values
are expected (which obviously aren't too many).
Have a nice day,
Berny
This bug report was last modified 4 years and 194 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.