如何禁用“set -x”?

Ave*_*nus 8 bash

出于某些调试目的,我启用了命令set -x。现在我的 bash 的输出是这样的:

$ ls
+ ls --color=auto
Certificates  Desktop  Documents  Downloads  Dropbox ...
Run Code Online (Sandbox Code Playgroud)

我怎样才能禁用set -x这样我就不会看到类似的东西+ ls --color=auto

jll*_*gre 17

你只需要运行 set +x

来自man bash

Using + rather than - causes these options to be turned  off.
Run Code Online (Sandbox Code Playgroud)