Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Feature request: ZSH_XTRACEFD variable
- X-seq: zsh-workers 45766
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Timothée Mazzucotelli <timothee.mazzucotelli@xxxxxxxxx>, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>, "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: Feature request: ZSH_XTRACEFD variable
- Date: Sun, 3 May 2020 08:07:59 +0100
- In-reply-to: <20200503060113.utatw2zz43maff6e@chazelas.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Timothée Mazzucotelli <timothee.mazzucotelli@xxxxxxxxx>, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>, "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAD8ZDTrfrWTKfa1efTo63uk1XJO4BOp5hSLOfjL1tXkeDMf_QQ@mail.gmail.com> <1563722540.4311.24.camel@samsung.com> <CAD8ZDTokqOTfEajquX2SKU5pLWgd85sPdRMYkxE4nF0pQhi+BA@mail.gmail.com> <1565710707.5633.11.camel@samsung.com> <CAD8ZDTotCLBANtzppSbCcgKyLhkXaVWysjqv99xS6bnLypBViA@mail.gmail.com> <309829031.4459446.1587391766024@mail2.virginmedia.com> <CAD8ZDTp=rYsWiEkq3byjU=BRAA2iLwxt5QG_19MBc+Jo8dC-0w@mail.gmail.com> <CAH+w=7Ymtz4XH708BGvgwo89WNB=HttfyX+fHVHakz+Ybf==ag@mail.gmail.com> <20200503000658.6fddb904@tarpaulin.shahaf.local2> <20200503060113.utatw2zz43maff6e@chazelas.org>
2020-05-03 07:01:13 +0100, Stephane Chazelas:
[...]
> SHELLOPTS=xtrace BASH_XTRACEFD=7 some-command
[...]
> I don't think we want to go there with zsh.
[...]
I meant: we probably don't want to have options set via the
environment like with bash's SHELLOPTS and BASHOPTS, as that's
quite dangerous and does cause quite a few problems with bash
See for instance:
$ (SHELLOPTS= exec -a sh bash -c 'bash -c "printenv SHELLOPTS"')
braceexpand:hashall:interactive-comments:posix
See how all those POSIX compliance options have been enabled for
*all* bash invocations, just because bash was invoked as sh in
an environment with a SHELLOPTS variable.
But for ZSH_XTRACEFD, IMO it makes sense to import it as we do
already import PS4.
Note that BASHOPTS, SHELLOPTS and PS4 are in sudo's env var
blacklist, but BASH_XTRACEFD is not (maybe it should)
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author