To disable an option with set
change the minus to a plus.
set -v #enable verbosity
set +v #disable verbosity
This, along with the -x
option, is particularly useful in scripts for debugging.
Note that most of the set
options correspond to options you can use when invoking bash directly. "bash -v
" runs an instance of bash with verbosity enabled (you can add it to the shebang at the top of a script, for example). Or you can run bash
with no options first, then use set -v
separately to do the same thing.
And as always, the details are in the man page. Start with the OPTIONS
section at the top, then scroll down to the SHELL BUILTIN COMMANDS
and read the entry for set