shopt
Set and unset shell options.[1]
Change the setting of each shell option. Without any option arguments, list all shell options with an indication of whether or not each is set.[1]
Documentation
- bash -c 'help shopt'
- man 1 'bash' [EN]])
Syntax
shopt [PARAMETER ...] [OPTION ...]
Parameters
- -p
- Print each shell option with an indication of its status.
- -q
- Suppress output.
Shell Options
- cmdhist
- If 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. This option is enabled by default, but only has an effect if command history is enabled.
- histappend
- If 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.
- histreedit
- If set, and Readline is being used, a user is given the opportunity to re-edit a failed history substitution.
- histverify
- If set, and Readline is being used, the results of history substitution are not immediately passed to the shell parser. Instead, the resulting line is loaded into the Readline editing buffer, allowing further modification.
- no_empty_cmd_completion
- If set, and Readline is being used, Bash will not attempt to search the PATH for possible completions when completion is attempted on an empty line.
- promptvars
- If set, prompt strings undergo parameter expansion, command substitution, arithmetic expansion, and quote removal after being expanded as described below (see Controlling the Prompt).
- sourcepath
- If set, the source builtin uses the value of PATH to find the directory containing the file supplied as an argument.