set命令可以用来定制shell环境,使用选项“o”来打开或者关闭选项。例如打开选项:set -o 选项,关闭选项目:set +o 选项。
例如要打开vi交互式命令行编辑,则如下:
[root@localhost ~]# set -o allexport braceexpand emacs errexit errtrace functrace hashall histexpand history ignoreeof interactive-comments keyword monitor noclobber noexec noglob nolog notify nounset onecmd physical pipefail posix privileged verbose vi xtrace [root@localhost ~]# set -o vi [root@localhost ~]# set -o allexport braceexpand emacs errexit errtrace functrace |