Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Suppress tracing of "set +x"



On Feb 5, 11:09am, Dominik Vogt wrote:
}
} On Wed, Dec 30, 2015 at 04:30:32PM +0100, Martijn Dekker wrote:
} 
}   set -x
}   some command
}   RC=$?
}   { set +x; } 2>/dev/null
}   test ! x$RC = x0 && exit $RC
} 
} I want only "some command" traced, not "RC=$?".

    emulate zsh -xc 'some command'

Using "emulate ... -c" is like an "eval" with it's own option scope.
Drawbacks are (a) you have to choose an emulation mode and (b) you
must quote the command into a single string.



Messages sorted by: Reverse Date, Date, Thread, Author