You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The coreutils version currently accepts more argument option-value formats than that of the GNU version:
GNU: -I[FMT], --iso-8601[=FMT] output date/time in ISO 8601 format...
coreutils: -I, --iso-8601 [<FMT>] output date/time in ISO 8601 format...
This means the following arguments are accepted by coreutils but not GNU:
date -I=seconds
date -I seconds
date --iso-8601 seconds
GNU will treat =seconds as the value in the first one, and treat seconds as the positional argument [+FORMAT] in the next two.
coreutils will also reject some that are accepted by GNU since it will take the positional argument as the argument value, e.g. date -I 05091009:
error: invalid value '05091009' for '--iso-8601 [<FMT>]'
[possible values: date, hours, minutes, seconds, ns]
This cannot be simply fixed by setting require_equals for the clap argument, since it would also preclude the correct syntax -Iseconds. There probably are more examples of this discrepancy in coreutils (please comment below).
This is a known limitation in clap, and I have commented in this clap issue and made a fix PR.
The text was updated successfully, but these errors were encountered:
The coreutils version currently accepts more argument option-value formats than that of the GNU version:
GNU:
-I[FMT], --iso-8601[=FMT] output date/time in ISO 8601 format...
coreutils:
-I, --iso-8601 [<FMT>] output date/time in ISO 8601 format...
This means the following arguments are accepted by coreutils but not GNU:
date -I=seconds
date -I seconds
date --iso-8601 seconds
GNU will treat
=seconds
as the value in the first one, and treatseconds
as the positional argument[+FORMAT]
in the next two.coreutils will also reject some that are accepted by GNU since it will take the positional argument as the argument value, e.g.
date -I 05091009
:This cannot be simply fixed by setting
require_equals
for the clap argument, since it would also preclude the correct syntax-Iseconds
. There probably are more examples of this discrepancy in coreutils (please comment below).This is a known limitation in clap, and I have commented in this clap issue and made a fix PR.
The text was updated successfully, but these errors were encountered: