“如何撤销”;集合-x";在unixshell中?
在互联网上遵循一些随机的方向,尝试在shell上调试我的一个问题(我使用zsh),我运行了“如何撤销”;集合-x";在unixshell中?,shell,unix,Shell,Unix,在互联网上遵循一些随机的方向,尝试在shell上调试我的一个问题(我使用zsh),我运行了set-x。多亏了这一点,我解决了我的问题。然而,我现在处于一个尴尬的境地,不知道如何关闭这个调试——你看,我真的不知道我一开始做了什么 我还发现我可以做zsh,然后得到一个新的shell。明显的unset-x不起作用。我想知道正确的方法。谢谢 更新: 找到有关-x功能的unix和linux堆栈交换帖子。仍然不知道如何将其关闭。您可以使用set+x将其切换回来。帮助集的输出描述了这一点: $ help se
set-x
。多亏了这一点,我解决了我的问题。然而,我现在处于一个尴尬的境地,不知道如何关闭这个调试——你看,我真的不知道我一开始做了什么
我还发现我可以做zsh
,然后得到一个新的shell。明显的unset-x
不起作用。我想知道正确的方法。谢谢
更新:
找到有关
-x
功能的unix和linux堆栈交换帖子。仍然不知道如何将其关闭。您可以使用set+x
将其切换回来。帮助集的输出描述了这一点:
$ help set
set: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
...
-v Print shell input lines as they are read.
-x Print commands and their arguments as they are executed.
...
Using + rather than - causes these flags to be turned off. The
flags can also be used upon invocation of the shell. The current
set of flags may be found in $-. The remaining n ARGs are positional
parameters and are assigned, in order, to $1, $2, .. $n. If no
ARGs are given, all shell variables are printed.
注意“使用+
而不是-
会导致关闭这些标志”部分