GNU bug report logs - #44959
date error message should say -I

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Mon, 30 Nov 2020 13:15:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 44959 <at> debbugs.gnu.org
Subject: bug#44959: date error message should say -I
Date: Mon, 30 Nov 2020 21:31:56 +0000
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




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.