Options

These are options that can be turned on with the set -o command. All are initially off except where noted. Abbrevs, where listed, are arguments to set that can be used instead of the full set -o command (e.g., set -a is an abbreviation for set -o allexport). The abbreviations are actually backward-compatible Bourne shell options.

Option Abbrev Meaning
allexport -a Export all subsequently defined variables.
errexit -e Exit the shell when a command exits with non-0 status.
bgnice Run all background jobs at decreased priority (on by default).
emacs Use emacs-style command-line editing.
gmacs Use emacs-style command-line editing, but with a slightly different meaning for [CTRL-T] (See Command-line Editing).
ignoreeof Disallow [CTRL-D] to exit the shell.
markdirs Add / to all directory names generated from wildcard expansion.
monitor -m Enable job control (on by default).
noclobber Don't allow > redirection to existing files.
noexec -n Read commands and check for syntax errors, but don't execute them.
noglob -f Disable wildcard expansion.
nolog Disable command history.
nounset -u Treat undefined variables as errors, not as null.
privileged -p Script is running in suid mode.
trackall -h Substitute full pathnames for commands in alias expansions.
verbose -v Print commands (verbatim) before running them.
vi Use vi-style command-line editing.
viraw Use vi mode and have each keystroke take effect immediately.
xtrace -x Print commands (after expansions) before running them.