Re: option abbreviation exceptions

2009-01-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 1/10/2009 2:32 PM: [ feels like it should be the exception. I see treating --v like --version as a feature. a typing saver. But with [, it's good to minimize the number of strings that make it act differently. Or,

Re: option abbreviation exceptions

2009-01-14 Thread Jim Meyering
Eric Blake e...@byu.net wrote: According to Jim Meyering on 1/10/2009 2:32 PM: [ feels like it should be the exception. I see treating --v like --version as a feature. a typing saver. But with [, it's good to minimize the number of strings that make it act differently. Or, for echo and [,

Re: option abbreviation exceptions

2009-01-10 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 12/29/2008 10:02 AM: $ /bin/[ --help me | head -n1 /bin/[: missing `]' $ /bin/[ --help | head -n1 Usage: test EXPRESSION $ /bin/[ --hel | head -n1 Usage: test EXPRESSION Should the last example also complain about

Re: option abbreviation exceptions

2009-01-10 Thread Jim Meyering
Eric Blake e...@byu.net wrote: According to Jim Meyering on 12/29/2008 10:02 AM: $ /bin/[ --help me | head -n1 /bin/[: missing `]' $ /bin/[ --help | head -n1 Usage: test EXPRESSION $ /bin/[ --hel | head -n1 Usage: test EXPRESSION Should the last example also complain about missing `]',

Re: option abbreviation exceptions

2009-01-10 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 1/10/2009 10:48 AM: [ feels like it should be the exception. I see treating --v like --version as a feature. a typing saver. But with [, it's good to minimize the number of strings that make it act differently.

Re: option abbreviation exceptions

2009-01-10 Thread Jim Meyering
Eric Blake e...@byu.net wrote: According to Jim Meyering on 1/10/2009 10:48 AM: [ feels like it should be the exception. I see treating --v like --version as a feature. a typing saver. But with [, it's good to minimize the number of strings that make it act differently. Besides, why make

Re: option abbreviation exceptions

2009-01-08 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 12/29/2008 10:22 AM: Would this usage text be acceptable at better describing the situation? Usage: /bin/echo [SHORT-OPTION]... [STRING]... or: /bin/echo LONG-OPTION Sure. Here's a first patch that solves the

Re: option abbreviation exceptions

2009-01-08 Thread Jim Meyering
Eric Blake e...@byu.net wrote: According to Jim Meyering on 12/29/2008 10:22 AM: Would this usage text be acceptable at better describing the situation? Usage: /bin/echo [SHORT-OPTION]... [STRING]... or: /bin/echo LONG-OPTION Sure. Here's a first patch that solves the issues that we

Re: option abbreviation exceptions

2009-01-05 Thread Andrew McGill
On Tuesday 30 December 2008 15:00:18 Eric Blake wrote: According to Pádraig Brady on 12/30/2008 2:46 AM: Usage: truncate [OPTION]... [FILE]... Is supporting stdin a useful enhancement? er ... Maybe if you can get the shell to open different files based on some condition, though again

Re: option abbreviation exceptions

2008-12-30 Thread Pádraig Brady
Eric Blake wrote: src/truncate.c: printf (_(Usage: %s OPTION... FILE...\n), program_name); Inconsistent formatting. Do we really want to require either -r or -s, or would it make sense to make OPTION optional, in which case the default is -s0? I'm not sure that's a desirable

Re: option abbreviation exceptions

2008-12-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Pádraig Brady on 12/30/2008 2:46 AM: Usage: truncate [OPTION]... [FILE]... Is supporting stdin a useful enhancement? Maybe if you can get the shell to open different files based on some condition, though again that seems a little

option abbreviation exceptions (was: Suggestion for rmdir)

2008-12-29 Thread Eric Blake
Eric Blake ebb9 at byu.net writes: Some of these programs recognize the @option{--help} and @option{--version} -options only when one of them is the sole command line argument. +options only when one of them is the sole command line argument. For +these programs, abbreviations of the long

Re: option abbreviation exceptions

2008-12-29 Thread Eric Blake
Eric Blake ebb9 at byu.net writes: Certainly some inconsistent behavior. echo takes multiple arguments, but only when they are the short options -[neE] (I guess it's okay that they don't have long-option variants?). But when --help or --version is present, echo acts like it takes

Re: option abbreviation exceptions

2008-12-29 Thread Jim Meyering
Eric Blake e...@byu.net wrote: Eric Blake ebb9 at byu.net writes: Some of these programs recognize the @option{--help} and @option{--version} -options only when one of them is the sole command line argument. +options only when one of them is the sole command line argument. For +these

Re: option abbreviation exceptions

2008-12-29 Thread Jim Meyering
Eric Blake e...@byu.net wrote: Eric Blake ebb9 at byu.net writes: Certainly some inconsistent behavior. echo takes multiple arguments, but only when they are the short options -[neE] (I guess it's okay that they don't have long-option variants?). But when --help or --version is present,