Skip to content
The Shell Reliquary

/static/relicario/en/reliquia/set-mais-h/

Menu

SHL-026 · Containment

set +H

The switch: turns history expansion off where it gets in the way.

This entire collection lives behind one character, and some people prefer their exclamation mark quiet — anyone who pastes commands with ! inside double quotes knows event not found.

set +H turns expansion off for the bash session; setopt nobanghist does the same in zsh. The relics stay in the museum — Ctrl+R and Alt+. don't depend on them.

$ echo "Atenção!"
bash: !": event not found
$ set +H
$ echo "Atenção!"
Atenção!
The exclamation mark, retired with honors.