set-option
Bash set -o nolog
Historical option accepted by Bash but documented as ignored. A successful toggle is not evidence of any logging protection. Never rely on it for preventing disclosure of secrets. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): option enabled; option disabled.
Formal Syntax & Structure
bash syntaxbash
set -o nolog; set +o nologReturn Value
exit status
Option-setting command returns zero for a valid request; query status is zero if enabled, one if disabled.
Working Example
Example Snippetbash
set -o nolog[[ -o nolog ]] || exit 1printf 'option enabled\n'set +o nolog[[ ! -o nolog ]] || exit 1printf 'option disabled\n'