It depends - as a dollar-sign expansion,
$- expands to a list of the current shell's
settable single-letter options - such as
-C. For an example, an interactive shell will expand it at least like:
set -o option versions can be had with
But there is another kind of hyphen-special-parameter which is a sort of analog to this. You can use two consecutive hyphens to signal the end of options in a typical command's argument list, but you can also use a single-hypen to do the same for a POSIX-shell. Historically, shells accepted a single hyphen to mean much the same.
bash shell interprets a single-hyphen specially in argument list-contexts. With
set, for example it marks the end of options and disables
set - does not clear a parameter list if it is the first and only argument to
set -- would.
A login shell will often append a
- to its