Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Suppress tracing of "set +x"
- X-seq: zsh-users 21116
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Martijn Dekker <martijn@xxxxxxxx>
- Subject: Re: Suppress tracing of "set +x"
- Date: Fri, 1 Jan 2016 18:36:24 +0000
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=gxLCapwDMsLm4nC38ABKvqMt7kCrz60JugoqEkfctoE=; b=JwqfzkwWrkFyLMh66nY86SyhA8xT4DV4P9tsol8Eq3JC7VWCy0pMO21KfhWkHcn7Qu YBsf0q8ogc9IlK1NFa/+Dumcb+5bjlPae14j8tK80eIUxqMU3HY6DdHTZG4Tgh5q51sV Ddo0rQoBxjMYMrwr3ch1YniNZ+ncwUVyFOfeceR/PdBTRyiTNYP/rnNyo7vwf0gF1Qi0 cqIjArKiFyg2EJXIRP8DvOWltyISNEr0nIg1POKx7QYuSe7H/GucjgnS7YXt+z3ac0Kj As8GCjjVNWcBYcc/FYTQpbboqEhvzFfuj5NUiw/xaKohDRu92n9s62lXykf/6iAdK5cf MCww==
- In-reply-to: <5683F898.7010907__5021.31003090671$1451490149$gmane$org@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: Martijn Dekker <martijn@xxxxxxxx>, zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20151230104531.GA20496@linux.vnet.ibm.com> <5683F898.7010907__5021.31003090671$1451490149$gmane$org@inlv.org>
2015-12-30 16:30:32 +0100, Martijn Dekker:
> 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
[...]
You can also enable set -x in a subshell only:
(
set -x
cmd1 traced
cmd2 traced
)
cmd3 not traced
Or using an anynymous function:
(){
setopt localoptions xtrace
cmd1 traced
cmd2 traced
}
cmd3 not traced
That affects the PS4 display though.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author