Use long-form options in scripts
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.
Good:
bin/thing
--output tmp/results.txt
--input tmp/source.dat
--incremental
--verbose
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.