set-option

notify shell option

Also set -b. Requests immediate job status notifications instead of deferring them to the next prompt. Job control and the terminal affect the timing. Use wait for the actual status; notification text is not a stable machine interface. Fixture verifies the option only. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): enabled then disabled.

Formal Syntax & Structure

bash syntaxbash
set -o notify; set +o notify

Return Value

exit status

Setting or clearing an available option succeeds; a query returns zero when enabled and one when disabled.

Working Example

Example Snippetbash
set -o notify[[ -o notify ]] || exit 1set +o notify[[ ! -o notify ]] || exit 1printf "enabled then disabled\n"
Bash Reference