List of shell options

FIXME incomplete

This information was taken from a Bash version ”3.1.17(1)-release”, every now and then new options are added, so likely, this list isn't complete.

If the description is longer than a few lines, then there's an extended description below the table.

The default for all options is - unless otherwise mentioned - off. The shell-options can be set with the shopt builtin command.

cdable_varsTreat every non-directory argument to the cd-command as variable name containing a directory to cd into
cdspellIf set, minor errors in the spelling of a directory component in a cd command will be corrected. The errors checked for are transposed characters, a missing character, and one character too many. If a correction is found, the corrected file name is printed, and the command proceeds. This option is only used by interactive shells.
checkhashIf set, bash checks that a command found in the hash table exists before trying to execute it. If a hashed command no longer exists, a normal path search is performed.
checkwinsizeIf set, bash checks the window size after each command and, if necessary, updates the values of the variables LINES and COLUMNS
cmdhistIf set, bash attempts to save all lines of a multiple-line command in the same history entry. This allows easy re-editing of multi-line commands.
dotglobIf set, Bash includes filenames beginning with a . (dot) in the results of pathname expansion
execfailIf set, a non-interactive shell will not exit if it cannot execute the file specified as an argument to the exec-builtin command. An interactive shell does not exit if exec fails.
expand_aliasesIf set, aliases are expanded. This option is enabled by default for interactive shells.
extdebugIf set, behavior intended for use by debuggers is enabled. See extended extdebug description
extglobIf set, the extended pattern matching features are enabled.
extquoteIf set, $'string' and $”string” quoting is performed within parameter expansions enclosed in double quotes. This option is enabled by default.
failglobIf set, patterns which fail to match filenames during pathname expansion result in an error message
force_fignoreIf set, the suffixes specified by the FIGNORE shell variable cause words to be ignored when performing word completion even if the ignored words are the only possible completions. This option is enabled by default.
gnu_errfmtIf set, shell error messages are written in the standard GNU error message format
histappendIf set, the history list is appended to the file named by the value of the HISTFILE variable when the shell exits, rather than overwriting the file.
histreeditIf set, and readline is being used, a user is given the opportunity to re-edit a failed history substitution.
histverifyAllow to review a history substitution result by loading the resulting line into the editing buffer, rather than directly executing it.
hostcompleteIf set, bash completion also completes hostnames. On by default.
huponexitIf set, bash will send SIGHUP to all jobs when an interactive login shell exits.
interactive_commentsAllow commenting in interactive shells, on by default.
lithist
login_shellThe option is set when Bash is a login shell (set by the shell itself, don't change)
mailwarn
no_empty_cmd_completion
nocaseglob
nocasematch
nullglob
progcomp
promptvars
restricted_shell
shift_verbose
sourcepath
xpg_echoIf set, the echo-builtin command expands backslash-escape sequences by default (POSIX, SUS, XPG)

Extended descriptions

extdebug

FIXME

See also

internals/shell_options.txt (436 views) · Last modified: 2008/06/22 18:00 by thebonsai
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0