Reputation: 1163
I was playing around on the shell when by mistake, I typed echo $-
and I got the result himBH
. Immediately, I tried all other combinations of symbols along with the $ sign but with no luck.
I read this post but I didn't fully understand it. Can someone please epxlain what they mean by 'shell options' and what himBH is supposed to mean?
Much thanks!
Upvotes: 35
Views: 22595
Reputation: 786001
$-
prints The current set of options in your current shell.
himBH
means following options are enabled:
H
- histexpand
: when history expansion is enabledm
- monitor
: when job control is enabledh
- hashall
: Locate and remember (hash) commands as they are looked up for executionB
- braceexpand
: when brace expansion is enabledi
- interactive
: when current shell is interactiveUpvotes: 67