From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: SH_FILE_EXPANSION broken with process substitution
Date: Wed, 24 Jun 2020 11:46:49 +0100 (BST) [thread overview]
Message-ID: <1037903351.49961.1592995609930@mail2.virginmedia.com> (raw)
In-Reply-To: <1131758486.49253.1592994514109@mail2.virginmedia.com>
> On 24 June 2020 at 11:28 Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> > On 23 June 2020 at 22:23 Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
> > Following on from the gpg completion breakage, it seems this option has
> > been broken when used in combination with EQUALS.
> >
> > This got broken in 35a8612 (workers/26042), released in 4.3.10:
> > zsh -df --shfileexpansion -c ': =(echo hi)'
Same but with test... D03 already tests that process substitution is
implemented, so it to be safe to test the result is fully functional.
pws
diff --git a/Src/subst.c b/Src/subst.c
index 90b5fc121..ed3f4a82b 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -796,7 +796,7 @@ filesubstr(char **namptr, int assign)
*namptr = dyncat(hom, ptr);
return 1;
}
- } else if (*str == Equals && isset(EQUALS) && str[1]) { /* =foo */
+ } else if (*str == Equals && isset(EQUALS) && str[1] && str[1] != Inpar) { /* =foo */
char *expn = equalsubstr(str+1, assign, isset(NOMATCH));
if (expn) {
*namptr = expn;
diff --git a/Test/D03procsubst.ztst b/Test/D03procsubst.ztst
index 8cf4e2a7f..68a68ef6e 100644
--- a/Test/D03procsubst.ztst
+++ b/Test/D03procsubst.ztst
@@ -156,3 +156,7 @@
procfunc <(echo argument)
0:With /proc/self file descriptors must not be tidied up too early
>argument
+
+ $ZTST_testdir/../Src/zsh -df -o shfileexpansion -c 'cat =(echo hi)'
+0:EQUALS expansion followed by =(...) (sh ordering) should work
+>hi
prev parent reply other threads:[~2020-06-24 10:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-01 1:42 Bu report - unix/_gpg completion broken O. simplex
2020-05-15 5:21 ` Solution: " O. simplex
2020-05-15 8:53 ` Daniel Shahaf
[not found] ` <Ww4N4kk6TH_2Cp6_B0A709kTrD8LonXJPl6qmAAx75k0eQ7OczWUSwo7LCJOnXJm-nyuAVtdf8HOIGGb0krLeM0Z_fRWy723j1XTVA6vgek=@protonmail.ch>
2020-06-06 6:38 ` O. simplex
2020-06-06 8:19 ` Daniel Shahaf
2020-06-09 23:07 ` Oliver Kiddle
2020-06-10 13:44 ` Daniel Shahaf
2020-06-23 21:23 ` SH_FILE_EXPANSION broken with process substitution Oliver Kiddle
2020-06-24 10:28 ` Peter Stephenson
2020-06-24 10:46 ` Peter Stephenson [this message]
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=1037903351.49961.1592995609930@mail2.virginmedia.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/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).