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

Re: Fun with zsh (Re: Associative array ordering (Re: Example function))



On Feb 2,  3:59am, Bart Schaefer wrote:
} Subject: Re: Fun with zsh (Re: Associative array ordering (Re: Example fun
}
} On Feb 2, 12:42pm, Helmut Jarausch wrote:
} } array> '(*.bz)AIcons-1.5.tar.bz2bzip -dc'
} }               ^^^^^^^^^^^^^^^^^^   where does this come from?
} 
} If you did cut and paste, that's showing up because there's a tab
} 
} That's obviously wrong here in more ways than one, and in fact my own
} just-compiled copy of zsh dumps core when I do the same thing.

I think this fixes it; at least, it prevents my crash, but I'm not sure
it's otherwise correct.  Help, Sven!

Index: Src/Zle/zle_tricky.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/Src/Zle/zle_tricky.c,v
retrieving revision 1.46
diff -u -r1.46 zle_tricky.c
--- zle_tricky.c	1999/02/01 17:26:44	1.46
+++ zle_tricky.c	1999/02/02 12:03:54
@@ -3708,7 +3708,7 @@
 {
     Patcomp pc;
     Comp pat;
-    char *s = findcmd(cmdstr, 1);
+    char *s = incmd ? findcmd(cmdstr, 1) : os;
 
     for (pc = patcomps; pc; pc = pc->next) {
 	if ((pat = parsereg(pc->pat)) &&

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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