Re: A simple hate today.

[prev] [thread] [next] [lurker] [Date index for 2006/05/25]

From: Juerd
Subject: Re: A simple hate today.
Date: 20:12 on 25 May 2006
H.Merijn Brand skribis 2006-05-25 18:19 (+0200):
> IMHO it should be either -? or --help, and -help could be acceptable

-? is silly. In most shells, it's a glob match, and is passed to the
program only if it didn't match.

I couldn't easily find any program that supports -?...

juerd@nano:~$ ls -?
ls: invalid option -- ?
Try `ls --help' for more information.
juerd@nano:~$ grep -?
grep: invalid option -- ?
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
juerd@nano:~$ du -?
du: invalid option -- ?
Try `du --help' for more information.
juerd@nano:~$ cp -?
cp: invalid option -- ?
Try `cp --help' for more information.
juerd@nano:~$ mv -?
mv: invalid option -- ?
Try `mv --help' for more information.
juerd@nano:~$ mkdir -?
mkdir: invalid option -- ?
Try `mkdir --help' for more information.
juerd@nano:~$ perl -?
Unrecognized switch: -?  (-h will show valid options).
juerd@nano:~$ ed -?
ed: invalid option -- ?
Try `ed --help' for more information.
juerd@nano:~$ vi -?
VIM - Vi IMproved 6.4 (2005 Oct 15, compiled Apr 28 2006 01:45:37)
Unknown option: "-?"
More info with: "vim -h"
juerd@nano:~$ yes -?
yes: invalid option -- ?
Try `yes --help' for more information.
juerd@nano:~$ awk -?
awk: not an option: -?
juerd@nano:~$ python -?
Unknown option: -?
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
juerd@nano:~$ ruby -?
ruby: invalid option -?  (-h will show valid options)

I found a few things that do support it, for some values of support.
The most likely reason for -? to work is that a program always gives
help when you use an unknown option (mount, ps). And sometimes it works,
but isn't documented (zip, gzip, firefox).

The only programs I could find that officially support this are abiword,
activation-client (some gnome thing), aspell, botti, epydocgui,
fc-{cache,list,match}, gconftool, gdm-signal, getent, gij,
gtk-update-icon-cache, h2xs, iconv, inkscape, irssi, java, less,
locale{,def}, nano, nmblookup, oo{base,calc,draw,ffice,fromtemplate,
impress,math,web}, pango-{querymodules,view}, pdbedit, pdf{fonts,images,
info,toppm,tops,totext}, pico, pon, profiles, rpcclient,
smb{cacls,control,get,mount,spool,client,cquotas,mnt,status,tree},
synclient, wvdial{,conf}, xkb{comp,evd,print}

I suspect you have something to do with the introduction of -? into
h2xs, in between perl 5.7.2 and 5.7.3 :)

So that's about 60 programs that do support -?, against over 1200 that
do not. Sanity wins!

> For me, -h never has meant help, nor do I expect *any* command or util to
> show me help on -h

Many, many more programs have -h bound to help, compared to those that
support -?.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html
There's stuff above here

Generated at 09:00 on 29 May 2006 by mariachi 0.52