From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6257 invoked from network); 4 Feb 2000 20:00:29 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Feb 2000 20:00:29 -0000 Received: (qmail 28201 invoked by alias); 4 Feb 2000 20:00:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9578 Received: (qmail 28193 invoked from network); 4 Feb 2000 20:00:20 -0000 To: zsh-workers@math.gatech.edu Subject: xtrace and redirections X-Attribution: adl From: Alexandre Duret-Lutz Date: 04 Feb 2000 20:58:39 +0100 Message-ID: User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Is this already known? ~/tmp/tmp % cat bar.zsh echo foo > bar 2>&1 ~/tmp/tmp % zsh -fx bar.zsh ~/tmp/tmp % cat bar +bar.zsh:1> echo foo foo It looks like the XTRACE output is printed after the IOs are redirected by the child process. This make scripts redirecting stderr fail under zsh -x. Other shells do this right: ~/tmp/tmp % bash -x bar.zsh + echo foo ~/tmp/tmp % cat bar foo ~/tmp/tmp % ksh -x bar.sh + echo foo + > bar + 2>&1 ~/tmp/tmp % cat bar foo -- Alexandre Duret-Lutz