zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] don't treat alone grouping pattern as glob qualifier
@ 2013-11-17  5:24 Han Pingtian
  2013-11-17 18:40 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Han Pingtian @ 2013-11-17  5:24 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-18 10:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-17  5:24 [PATCH] don't treat alone grouping pattern as glob qualifier Han Pingtian
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

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