set命令可以用来定制shell环境,使用选项“o”来打开或者关闭选项。例如打开选项:set -o 选项,关闭选项目:set +o 选项。
例如要打开vi交互式命令行编辑,则如下:
[root@localhost ~]#
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 [root@localhost ~]# set -o vi #把vi选项打开 [root@localhost ~]# set -o #查看当前设置情况 allexport off braceexpand on emacs off errexit off errtrace off functrace off |
转载于:https://blog.51cto.com/zhangrong/978389