Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Suppress tracing of "set +x"
- X-seq: zsh-users 21246
 
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
 
- To: zsh-users@xxxxxxx
 
- Subject: Re: Suppress tracing of "set +x"
 
- Date: Fri, 5 Feb 2016 10:48:34 -0800
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;        h=from:message-id:date:in-reply-to:comments:references:to:subject         :mime-version:content-type;        bh=k05KbW5bMFp41bC4zyLvbTtoGJ3Us5ZX8w4GaqOPxWc=;        b=CFbZre94VC8C1Veq7KPtR35QMT7EC5VA1B2/1yZkXbHfSYTLpfsSrDNQoiP0JYjkUZ         L2+Ogv7mLzX52jeFcgs5SdlB8Fwps01oE5c9IyNxypGWy5pflYlgAC7xhiWNmwNoJIL/         FV2WfXi49YbvtFCeQUHzOZDNUb6nB7h8uJFCk49tnc1xNJ9MoiuCHXeZa2RaYlgj5sHz         U/YyB5/Ix12Nwyhos/j7HkK+3aEJS783QRj4j962P/dSi+WGLnptU9HloamECv96EOfv         tkIndGUy5SjPrWWp7LYjvd5sUE73ZKsYBW5gevnHZURWuRUUrYTolmymr079nnWAh/Yk         VRug==
 
- In-reply-to: <20160205100902.GA14979@linux.vnet.ibm.com>
 
- List-help: <mailto:zsh-users-help@zsh.org>
 
- List-id: Zsh Users List <zsh-users.zsh.org>
 
- List-post: <mailto:zsh-users@zsh.org>
 
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
 
- References: <20151230104531.GA20496@linux.vnet.ibm.com> 	<5683F898.7010907@inlv.org> 	<20160205100902.GA14979@linux.vnet.ibm.com>
 
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