zsh-workers
 help / color / mirror / code / Atom feed
From: Han Pingtian <hanpt@linux.vnet.ibm.com>
To: zsh-workers@zsh.org
Subject: [PATCH] don't treat alone grouping pattern as glob qualifier
Date: Sun, 17 Nov 2013 13:24:23 +0800	[thread overview]
Message-ID: <20131117052423.GA20827@localhost.localdomain> (raw)

Hello,

I think this is a minor bug:

% ls
a  sym1  sym2  sym3  sym4  testfile
% print (s*)
zsh: no match
%

Looks like the alone grouping pattern (s*) is treated as qualifier.

And I have figured out a patch which looks like fixes the issue. Please 
have a look. 

Thanks.

---
 Src/glob.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Src/glob.c b/Src/glob.c
index e0d0cf6..385b9e6 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -1171,7 +1171,7 @@ zglob(LinkList list, LinkNode np, int nountok)
 		break;
 	    }
 	}
-	if (*s != Inpar)
+	if (*s != Inpar || s == str)
 	    break;
 	if (isset(EXTENDEDGLOB) && !zpc_disables[ZPC_HASH] && s[1] == Pound) {
 	    if (s[2] == 'q') {
-- 
1.7.7.6


             reply	other threads:[~2013-11-17  5:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-17  5:24 Han Pingtian [this message]
2013-11-17 18:40 ` Bart Schaefer
2013-11-18  0:30   ` Han Pingtian
2013-11-18  3:42     ` Bart Schaefer
2013-11-18 10:42       ` Peter Stephenson
2013-11-18 10:31   ` 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:
  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=20131117052423.GA20827@localhost.localdomain \
    --to=hanpt@linux.vnet.ibm.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).