chrome $ unzip --help
UnZip 5.52 of 28 February 2005, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
# 2 dozen lines of helpful info omitted
chrome $ zip --help
zip error: Invalid command arguments (no such option: -)
chrome $
There's a very logical explanation for this, similar to why certain words in English are spelled in apparently arbitrary, inconsistent ways. For example, while it might seem maddening to remember which adjectives end in "able" and which end in "ible", all you have to remember is whether the Latin word the adjective is derived from ends in "abilis" or "ibilis". Another very useful cue, which I currently can't come up with a concrete example for, is knowing in whch rough century a word entered the English language. Knowledge of the fashion at the time could help remembering, for example, whether the spelling of a trade would end in "er" or "or".
It's similar in software. Sometime around the turn of the century the GNU Coding Standard calling for "--help" for command-line help options was adopted nearly universally. Before that common ways of accessing help were "-h", "-?", or programs often left the help to the man page[2].
The link program I run has a 2005 copyright on it, while the zip program was last compiled in 1999.
So obviously to be a fluent user of a system you need to know when the various tools you use were last compiled. Chances are, if you knew that, you wouldn't need the online help -- there's enough in your head already.
Any utility that supports "--help" and doesn't have a "-h" option, and is unlikely to ever need one, might as well map "-h" to "--help". And if there is a logical meaning for a "-h" option, if it doesn't make sense when it's the only argument, treat it like "--help". Doing otherwise leaves the impression of the inflexable software writer mocking the incapible user.
[1] http://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html#Command_002dLine-Interfaces
was dropped
[2] http://www.faqs.org/docs/artu/ch10s05.html
[3] Typos in the last sentence are metonymical.
1 comment:
You are such a geek :)
On another note, I have booked a car for Saturday morning. So lets hope the weather stays dry.
I'll call you when we have more weather data available...
T
Post a Comment