Command line tools and shell builtins can offer both a short- and long-form way to specify options. Sometimes these are also called short and long flags, respectively. The upshot is a user experience with two ways to specify the same option. A short and terse way. And a longer, more verbose way.
$ curl -HLsS http://stevenharman.net # ⬆ is the same as ⬇ $ curl --head --location --silent --show-error http://stevenharman.net
Both ways are useful, neither right nor wrong, and each with their own trade offs to consider.
Why are there two ways to say the same thing?
It’s a good question. One I’ve asked too. But I’ve not found a definitive answer. Perhaps the truth is lost to history at this point?
From what I can tell, originally (i.e., the early/original *nix flavored OSes) there were only single-character options. At some point multi-character options were added, possibly via GNU.
Along the way the sheer number of options also grew, a lot. Is this a cause and effect relationship, a correlation, or pure happenstance? I don’t know. But today we have A LOT of options, and often multiple ways to express them.
Let’s talk about the trade offs and when to use each style.