$-
The shell's lit options, one letter per flag.
Each letter in $- is an option turned on: i for interactive, H for history expansion, m for job control, x when set -x tracing is lit.
The classic use lives in startup files: case $- in *i*) separates what only makes sense with a human at the keyboard.
$ echo $-
himBHs
$ bash -c 'echo $-'
hBc