command-line option

An argument starting with a dash, such as -r or --help, that changes how a command behaves rather than naming what it works on.

In more detail

Short options use one dash and one letter (-m) and can often be combined (-am), while long options use two dashes and a word (--staged). By convention a lone -- ends the options, so anything after it is treated as an argument even if it starts with a dash.

Examples

git log --oneline -- parser.py
probe -tries 5 -timeout 2s db-1
probe --timeout 2s db-1

Related terms

Taught in

References