Name
shopt
Synopsis
shopt [options] [optnames]Set or unset variables that control optional shell behavior. With no options or with -p, display the settable optnames.
Options
- -o
Allow only options defined for the set -o built-in to be set or unset.
- -p
Display output in a form that can be reused as input.
- -q
Quiet mode. Suppress normal output.
- -s
Set (enable) each specified option. With no optname, list all set options.
- -u
Unset (disable) each specified option. With no optname, list all unset options.
Settable shell options
Unless otherwise noted, options are disabled by default.
- cdable_vars
If an argument to the cd built-in is not a directory, assume that it’s a variable containing the name of the directory to change to.
- cdspell
For interactive shells, check for minor errors in the name of a directory component (transposed characters, a missing character, or an extra character). Print the corrected name and proceed.
- checkhash
Check that a command found in the hash table actually exists before trying to execute it; if it is not found, do a path search.
- checkwinsize
Check the window size after each command and update LINES and COLUMNS as necessary.
- cmdhist
Attempt to save all lines of a multiline command in one history entry to facilitate re-editing.
- dotglob
Include filenames beginning with . in the results of pathname expansion.
- execfail
For a noninteractive shell, do not exit if the file specified as an argument to exec cannot be executed. For an interactive shell, do not exit from the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access