Use long-form options in scripts

Note last edited December 2022

In scripts, prefer long-form command-line options over short options.

Short-hand options are fine to use for one-off commands. However, when written down in a script, short-hand options are too cryptic.


  --output  tmp/results.txt
  --input   tmp/source.dat

This is readable, and the command line options make sense without context.

Not as good:

bin/thing -o tmp/results.txt -i tmp/source.dat -Iv

The -o and -i options might be understandable because they are Common command-line options, but the other options are a mystery without context.

Note last edited December 2022.