From help shopt (or shopt --help as well on BSD systems):
Options:
-o restrict OPTNAMEs to those defined for use with `set -o'
-p print each shell option with an indication of its status
-q suppress output
-s enable (set) each OPTNAME
-u disable (unset) each OPTNAME
Use the
-uoption:-sis for setting and-uis for unsetting.From
help shopt(orshopt --helpas well on BSD systems):To see how to do shopt in a clean way, see this:
https://github.com/codeforester/base/blob/master/lib/shopt.sh