If you type help set, then - among other things - a list of shell options is displayed. But these options are not the same as those displayed with shopt. And different also from those displayed with set and env.

Is there a command which displays options such as errexit and braceexpand and their current values?

Also, what is the connection between the different option commands? What does set display that env doesn't / what does shopt display that set doesn't / etc ?

(bash 3.2.51 on Mac OS X 10.9.1)

1 Answer 1


Use set -o:

$ set -o
allexport       off
braceexpand     on
emacs           on
errexit         off
errtrace        off
functrace       off
hashall         on
histexpand      on
history         on
ignoreeof       off
interactive-comments    on
keyword         off
monitor         on
noclobber       off
noexec          off
noglob          off
nolog           off
notify          off
nounset         off
onecmd          off
physical        off
pipefail        off
posix           off
privileged      off
verbose         off
vi              off
xtrace          off

Also see Set and Shopt - Why Two?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .