How to undo "install -x" in unix shell?

Following some random directions on the Internet, trying to debug my shell problem (I use zsh), I ran set -x . Thanks to this, I understood my problem. However, I am now in an uncomfortable position, not knowing how to cancel this debugging, I really don’t even understand what I did, first of all, you see.

I also realized that I could just do zsh and get a new shell. The obvious unset -x does not work. I would like to know the right way. Thanks!

Update:

Found this unix & linux stack exchange post about what -x does. Still don't know how to disable it.

+6
source share
1 answer

You can use set +x to return it. The help set output describes this:

 $ 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. 

Please note that "Using + , but not - disable these flags."

+12
source

Source: https://habr.com/ru/post/973468/


All Articles