zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: Recent regression on (N) after removing array element
Date: Wed, 20 Nov 2013 17:33:23 +0000	[thread overview]
Message-ID: <20131120173323.485d6e77@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <131119100222.ZM18442@torch.brasslantern.com>

On Tue, 19 Nov 2013 10:02:22 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> } Apart from going back to the original, the only ways round that occur to
> } me involve reparsing on failure, e.g. reinterpreting as glob qualifiers
> } if no matches were found.  But that's probably worse than the original
> } disease.
> 
> Yeah, I think we have to back this one out.

In the absence of immediate smart ideas...

Here's a test so we don't forget.

diff --git a/Src/glob.c b/Src/glob.c
index 385b9e6..e0d0cf6 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -1171,7 +1171,7 @@ zglob(LinkList list, LinkNode np, int nountok)
 		break;
 	    }
 	}
-	if (*s != Inpar || s == str)
+	if (*s != Inpar)
 	    break;
 	if (isset(EXTENDEDGLOB) && !zpc_disables[ZPC_HASH] && s[1] == Pound) {
 	    if (s[2] == 'q') {
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst
index d6ab733..81b0021 100644
--- a/Test/D02glob.ztst
+++ b/Test/D02glob.ztst
@@ -491,3 +491,11 @@
 >@(scrimf), @(scrimf): 0
 >'(' '*' '[' '^' '@('
 >Nothing should be disabled.
+
+  (
+   setopt nomatch
+   x=( '' )
+   print $^x(N)
+  )
+0:No error with empty null glob with (N).
+>

pws


      reply	other threads:[~2013-11-20 17:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19 17:08 Vin Shelton
2013-11-19 17:52 ` Peter Stephenson
2013-11-19 18:02   ` Bart Schaefer
2013-11-20 17:33     ` 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=20131120173323.485d6e77@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.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).