zsh-workers
 help / color / mirror / code / Atom feed
From: Alexandre Duret-Lutz <duret_g@epita.fr>
To: zsh-workers@math.gatech.edu
Subject: xtrace and redirections
Date: 04 Feb 2000 20:58:39 +0100	[thread overview]
Message-ID: <mvb3dr8yc28.fsf@phobos.lrde.epita.fr> (raw)


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


             reply	other threads:[~2000-02-04 20:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-04 19:58 Alexandre Duret-Lutz [this message]
2000-02-06 18:24 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvb3dr8yc28.fsf@phobos.lrde.epita.fr \
    --to=duret_g@epita.fr \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).