the -o option to the set builtin command (see Section 4.3.1 [The Set Builtin], page 58). With no options, or with the -p option, a list of all settable options is displayed, with an indication of whether or not each is set. The -p option causes output to be displayed in a form that may be reused as input. Other options have the following meanings:
-s
Enable (set) each optname.
-u
Disable (unset) each optname.
-q
Suppresses normal output; the return status indicates whether the optname is set or unset. If multiple optname arguments are given with -q, the return status is zero if all optnames are enabled; non- zero otherwise.
-o
Restricts the values of optname to be those defined for the -o option to the set builtin (see Section 4.3.1 [The Set Builtin], page 58).
If either -s or -u is used with no optname arguments, shopt shows only those options which are set or unset, respectively.
Unless otherwise noted, the shopt options are disabled (off) by default.
The return status when listing options is zero if all optnames are enabled, non- zero otherwise. When setting or unsetting options, the return status is zero unless an optname is not a valid shell option.
The list of shopt options is: autocd
If set, a command name that is the name of a directory is executed as if it were the argument to the cd command. This option is only used by interactive shells. cdable_vars
If this is set, an argument to the cd builtin command that is not a directory is assumed to be the name of a variable whose value is the directory to change to. cdspell
If 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 a character too many. If a correction is found, the corrected path is printed, and the command proceeds. This option is only used by interactive shells. checkhash
If this is 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. checkjobs
If set, Bash lists the status of any stopped and running jobs before exiting an interactive shell. If any jobs are running, this causes the exit to be deferred until a second exit is attempted without an intervening command (see Chapter 7 [Job Control], page 97). The shell always postpones exiting if any jobs are stopped.