Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Suppress tracing of "set +x"
- X-seq: zsh-users 21235
- From: Dominik Vogt <vogt@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Suppress tracing of "set +x"
- Date: Fri, 5 Feb 2016 11:09:02 +0100
- In-reply-to: <5683F898.7010907@inlv.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20151230104531.GA20496@linux.vnet.ibm.com> <5683F898.7010907@inlv.org>
- Reply-to: vogt@xxxxxxxxxxxxxxxxxx
On Wed, Dec 30, 2015 at 04:30:32PM +0100, Martijn Dekker wrote:
> Dominik Vogt schreef op 30-12-15 om 11:45:
> > "set -x" is very handy when printing commands from buils scripts
> > and such, but what really annoys me is that the final "set +x"
> > that ends tracing is also printed. Is there really no way to
> > suppress tracing of this specific command?
>
> { set +x; } 2>/dev/null
I've been using this for a while, and it works nicely. But now
consiter this:
set -x
some command
RC=$?
{ set +x; } 2>/dev/null
test ! x$RC = x0 && exit $RC
I want only "some command" traced, not "RC=$?". Yet I have to do
it before the "set +x" because the latter overwrites $?. Any
ideas how to get around this?
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany
Messages sorted by:
Reverse Date,
Date,
Thread,
Author