We all know that when we use hyphen after the command
I skimmed the man page, this should be pretty complete. I learned some things.
Many built-in commands use a hyphen for options, like
-- declares the end of options to a shell builtin.
$- "expands to the current option flags as specified upon invocation".
-N unary minus.
--N pre and post increment operators.
N - M subtraction.
N -= M subtract and assign
file1 -X file2 and
-X file are file test operators
~- will expand to the value of
-X string are various string operators.
-o optname to check if an option is enabled.
-X varname various variable operators.
~-N, where N is a number, will expand to the value in the directory stack.
arg1 -op arg2 various binary comparison operators.
word as the default if the parameter is unset.
[a-d] in a pattern match indicates a character set range.
<&- indicates to duplicate and close a file descriptor.
<<- indicates a here document to strip leading tab characters.
%- previous job.
\M- are used to display a meta character.
\C- are used to display a control character.
Readline variables can have
- in their name.
x-y are a range of words when selecting from an event.
expr1 -X expr2 boolean logic and/or test operators