--- Src/utils.c 6 Feb 2006 11:57:07 -0000 1.116 +++ Src/utils.c 11 Feb 2006 03:29:36 -0000 @@ -2515,6 +2515,8 @@ equalsplit(char *s, char **t) return 0; } +static int specialcomma; + /* the ztypes table */ /**/ @@ -2614,10 +2614,22 @@ inittyptab(void) } for (s = SPECCHARS; *s; s++) typtab[STOUC(*s)] |= ISPECIAL; + if (specialcomma) + typtab[STOUC(',')] |= ISPECIAL; if (isset(BANGHIST) && bangchar && interact && isset(SHINSTDIN)) typtab[bangchar] |= ISPECIAL; } +/**/ +void +makecommaspecial(int yesno) +{ + if ((specialcomma = yesno) != 0) + typtab[STOUC(',')] |= ISPECIAL; + else + typtab[STOUC(',')] &= ~ISPECIAL; +} + /**/ #ifdef MULTIBYTE_SUPPORT --- Src/Zle/zle_tricky.c 12 Jan 2006 00:51:53 -0000 1.64 +++ Src/Zle/zle_tricky.c 11 Feb 2006 03:29:38 -0000 @@ -586,6 +586,7 @@ docomplete(int lst) } active = 1; comprecursive = 0; + makecommaspecial(0); if (undoing) setlastline(); @@ -662,6 +663,7 @@ docomplete(int lst) unmetafy_line(); zsfree(s); active = 0; + makecommaspecial(0); return 1; } ocs = zlemetacs; @@ -852,6 +854,7 @@ docomplete(int lst) unmetafy_line(); active = 0; + makecommaspecial(0); return dat[1]; } @@ -1593,6 +1596,7 @@ get_comp_string(void) p = tp - 1; continue; } + makecommaspecial(1); if (bbeg) { Brinfo new; int len = bend - bbeg; @@ -1639,6 +1643,7 @@ get_comp_string(void) continue; } cant = 1; + makecommaspecial(1); break; } if (p == curs) {