From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10009 invoked by alias); 5 Feb 2016 10:27:07 -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: 21236 Received: (qmail 1118 invoked from network); 5 Feb 2016 10:27:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: vogt@linux.vnet.ibm.com X-IBM-RcptTo: zsh-users@zsh.org Date: Fri, 5 Feb 2016 11:16:46 +0100 From: Dominik Vogt To: zsh-users@zsh.org Subject: Re: Suppress tracing of "set +x" Message-ID: <20160205101646.GA16819@linux.vnet.ibm.com> Reply-To: vogt@linux.vnet.ibm.com Mail-Followup-To: zsh-users@zsh.org References: <20151230104531.GA20496@linux.vnet.ibm.com> <5683F898.7010907@inlv.org> <20160205100902.GA14979@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160205100902.GA14979@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16020510-0025-0000-0000-000008D9AD30 On Fri, Feb 05, 2016 at 11:09:02AM +0100, Dominik Vogt 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=$?". Yet I have to do > it before the "set +x" because the latter overwrites $?. Hm, I tried { RC="$?"; set +x; } 2>/dev/null first and thought it did not work, but it does. Maybe there was some typo. Sorry for the confusion. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany