help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] NO_EXEC should not exec $NULLCMD
Date: Mon, 6 Feb 2023 14:33:47 +0000 (GMT)	[thread overview]
Message-ID: <1721279218.10760102.1675694027023@mail.virginmedia.com> (raw)
In-Reply-To: <CAHLkEDv2rGqDy4Cns3kPG61uQnN0ZUps7RCZuuRkh1z1xm5g1A@mail.gmail.com>

> On 06/02/2023 12:22 Marlon Richert <marlon.richert@gmail.com> wrote:
> Steps to reproduce:
> % PS1='%# ' zsh -f
> % zsh -nc ': $( < $1 )'; print $?
> zsh:1: no such file or directory:
> 1

$(<$1) is special syntax to open $1 and insert it on the command line;
it's nothing to do with $NULLCMD, nor is anything being executed.
So --- given the way NO_EXEC doesn't have a very detailed specification
in zsh --- I don't think it's actually violating any designed behaviour
(that's quite a weak statement in these parts).

However, it is a reasonable question whether the redirection should
be taking place here at all, as it doesn't in other cases when
NO_EXEC is set, even if that's mostly a side effect of where the NO_EXEC
logic lives, so it's certainly quite confusing.   If not, it shouldn't
be hard to suppress.


  reply	other threads:[~2023-02-06 14:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06 12:22 Marlon Richert
2023-02-06 14:33 ` Peter Stephenson [this message]
2023-02-13 17:42   ` Peter Stephenson

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=1721279218.10760102.1675694027023@mail.virginmedia.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \


* 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


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