From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5512 invoked by alias); 1 Jan 2016 22:45:18 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21116 Received: (qmail 14540 invoked from network); 1 Jan 2016 22:45:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 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== X-Received: by 10.28.88.8 with SMTP id m8mr37332754wmb.73.1451673386781; Fri, 01 Jan 2016 10:36:26 -0800 (PST) Date: Fri, 1 Jan 2016 18:36:24 +0000 From: Stephane Chazelas To: Martijn Dekker Cc: zsh-users@zsh.org Subject: Re: Suppress tracing of "set +x" Message-ID: <20160101183624.GA8456@chaz.gmail.com> Mail-Followup-To: Martijn Dekker , zsh-users@zsh.org References: <20151230104531.GA20496@linux.vnet.ibm.com> <5683F898.7010907__5021.31003090671$1451490149$gmane$org@inlv.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5683F898.7010907__5021.31003090671$1451490149$gmane$org@inlv.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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