Ben Pfaff <[EMAIL PROTECTED]> wrote:
> Jim Meyering <[EMAIL PROTECTED]> writes:
>> Bruno Haible <[EMAIL PROTECTED]> wrote:
>>> I can prepare a patch for this; just let me know whether for
>>> $ od -j -1
>>> you would see the error message
>>> od: invalid --skip-bytes argument `-1'
>>> or
>>> od: invalid `-j' argument `-1'
>>
>> You've discovered why the current diagnostics do not mention
>> explicit option strings: hard-coding an option string like --skip-bytes
>> or -j will inevitably be misleading to those who specify the offending
>> argument with the alternative option string.
>
> Would it be reasonable for the message to read as:
> od: invalid -j or --skip-bytes argument `-1'
A little background on my bias :-)
There's been (at least with coreutils) a long-standing informal policy
to avoid using option strings in diagnostics. The rationale is that the
messages are usually more readable without them. Also, the message needn't
change if/when the option name changes.
Also, with the format,
_("invalid %s argument `%s'")
if the first "%s" can be either "--foo", or "-f or --foo", that seems
like it may lead to translation problems, e.g., if "invalid" and/or
"argument" would have slightly different translations in those two cases.
However, I don't know enough to say for sure.