On 3 January 2015 at 14:06, Benno Schulenberg <[email protected]> wrote:
> > On 2015-01-01 14:33, Sami Kerola wrote: > > * src/hello.c: Remove -h and -v options, and leave --help and --version > > as they were. > > Maybe the GNU standards say nothing about short options > > , but it > is *so* much a custom for command-line tools to recognize -h and > -V for --help and --version, that I don't think it is a good idea > to show as an example-to-be-imitated these two long options without > any corresponding short options. You may wish to poke some GNU > people about this directly. Karl Berry? Eric Blake? Maybe > mister Stallman himself? > The reference is https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html which does not mention short options, except to say that they should have corresponding long options. > Also, if you remove -h and -v, why not also remove -g and -t? > Because often one wants short options, so hello illustrates them. I think the reasoning for hello (and other programs) often eschewing short options for --help and --version is that the letters -h and -v may often be useful for other more frequently-used options, e.g. -v for --verbose. Long options are nice for scripts, for clarity, so commands don't > need comments. Short options are great (nearly essential) for > typing things on the command line. > Less so now that we have bash-completion. Also, given an unknown program, it's more likely that --version or --help will succeed, so I wouldn't generally type that (until I discover that a particular program only accepts short options, grr). So, given the tendency of GNU programs not to have short equivalents for these two options, I don't see why hello should have them. If you disagree, then indeed it might be worth raising on gnu-prog-discuss; but I think hello should reflect the GCS and general practice. -- http://rrt.sc3d.org
