Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] don't treat alone grouping pattern as glob qualifier



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



Messages sorted by: Reverse Date, Date, Thread, Author