如何在Bash中禁用shopt选项?
如何禁用如何在Bash中禁用shopt选项?,bash,shopt,Bash,Shopt,如何禁用shopt选项,例如extglob 我的.bashrc文件中有: shopt -s extglob 使用-u选项: shopt -u extglob -s用于设置,-u用于取消设置 从help shopt(或BSD系统上的shopt--help): 要了解如何以干净的方式进行shopt,请参见以下内容: 有一个选项-u来禁用它。但问题是,因为您在.bashrc中有它,所以在每个登录shell中都启用了该设置。每次要禁用它时,都需要执行shopt-uextglobshopt是一个
shopt
选项,例如extglob
我的.bashrc
文件中有:
shopt -s extglob
使用
-u
选项:
shopt -u extglob
用于设置,-s
用于取消设置-u
help shopt
(或BSD系统上的shopt--help
):
要了解如何以干净的方式进行shopt,请参见以下内容:
有一个选项
-u
来禁用它。但问题是,因为您在.bashrc
中有它,所以在每个登录shell中都启用了该设置。每次要禁用它时,都需要执行shopt-uextglob
shopt
是一个bash内置命令。请参见帮助商店。
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