help / color / mirror / code / Atom feed
From: Zach Riggle <zachriggle@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Builtins like "exec" redirection are not printed with xtrace
Date: Wed, 11 May 2022 01:48:30 -0500	[thread overview]
Message-ID: <CAMP9c5kA=dQHFESte76nZuAZ=tHbCZNwgTPR1sKnQsrrV6yjVQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

It seems that the following produces no output

    setopt xtrace
    exec 1>/dev/null

Is there a reason that xtrace does not show the exec line?

Similarly, other commands with I/O redirection seem to not be logged in
xtrace, e.g.

    $ cat xt
    setopt xtrace
    head -c 8 /bin/sh | xxd > /dev/null

    $ zsh xt
    +xt:3> head -c 8 /bin/sh
    +xt:3> xxd

Is there a way to get xtrace (or another option) to log the I/O redirection?

*Zach Riggle*

[-- Attachment #2: Type: text/html, Size: 1222 bytes --]

                 reply	other threads:[~2022-05-11  6:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \
    --in-reply-to='CAMP9c5kA=dQHFESte76nZuAZ=tHbCZNwgTPR1sKnQsrrV6yjVQ@mail.gmail.com' \
    --to=zachriggle@gmail.com \
    --cc=zsh-users@zsh.org \
    --subject='Re: Builtins like "exec" redirection are not printed with xtrace' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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).