O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, don't exit if the file specified as an argument to exec cannot be executed. For an interactive shell, don't exit from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required