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

PATCH: Re: BUG: globbing



Sven Wischnowsky wrote:
> 
> See:
> 
>   (...) ./zsh -f
>   beta% mkdir foo; cd foo; touch 'a~'
>   beta% setopt extendedglob
>   beta% echo *~
>   zsh: bad pattern: *~

illogical

--- Src/pattern.c~	Wed Sep  1 14:54:58 1999
+++ Src/pattern.c	Thu Sep  2 10:22:55 1999
@@ -601,8 +601,8 @@
     *flagp = P_PURESTR;
 
     starter = chain = 0;
-    while (!memchr(patendseg, *patparse, patendseglen) &&
-	   (*patparse != Tilde ||
+    while (!memchr(patendseg, *patparse, patendseglen) ||
+	   (*patparse == Tilde &&
 	    memchr(patendseg, patparse[1], patendseglen))) {
 	if (isset(EXTENDEDGLOB) &&
 	    ((!isset(SHGLOB) &&

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



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