A Brief Incomplete and Mostly Made-up History of Command Line Options
And now for a completely useless post.
A long time ago in a world without internet typing characters was a premium.1 To account for this premium most applications would use command line options that had a single characters. A good example of this is the "verbose" option. Tradditionally this was indicated with a
-v on the command line.
As time went by there were situations where two options had the same first character. One way around this was to just use another letter for the option. An example of this might be the option
-a. This might represent the intent to "append". Or it might represent the option for "add" or "all". Using
-l to represent an alternative just doesn't seem like a choice that makes sense to someone that isn't familiar with the options.
As resources became "cheaper" and more plentiful the practice of expanding the characters used for an option became more common. Instead of use the
-v for "verbose" the entire word might be used. The
-v would now be represented by
--verbose. The use of two dashes2 are used to indicate that the option is a full word and not a single character.
It was also common practice to use aliases when a full word could be used or the single letter could be used to indicate the same parameter. In the case of a "verbose" option it is possible to use either the
-v syntax or the
--verbose syntax to indicate the option.
1: Computers were "slow" and had limited memory. Also, programmers are notoriously "lazy". They want to type as little as possible to get to where they need to go.↩
2: Not to be confused with the empty double dash
-- which is used to indicate the end of command line processing.↩
You must be logged in to see the comments. Log in now!