* Builtins like "exec" redirection are not printed with xtrace
@ 2022-05-11 6:48 Zach Riggle
0 siblings, 0 replies; only message in thread
From: Zach Riggle @ 2022-05-11 6:48 UTC (permalink / raw)
To: Zsh Users
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
It seems that the following produces no output
#!/bin/zsh
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
#!/bin/zsh
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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-11 6:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 6:48 Builtins like "exec" redirection are not printed with xtrace Zach Riggle
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).