summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2006-02-13 10:59:22 +0000
committerWayne Davison <wayned@users.sourceforge.net>2006-02-13 10:59:22 +0000
commita4d4cf5cf872e18d678476b76fe5ee83bafd0fa9 (patch)
tree0fa368848404794b1064860813885612574646f9
parent4ae3672ce8f9ad1ea091295b9e7ceb0279c2fc79 (diff)
downloadzsh-a4d4cf5cf872e18d678476b76fe5ee83bafd0fa9.tar.gz
zsh-a4d4cf5cf872e18d678476b76fe5ee83bafd0fa9.zip
Added the makecommaspecial() routine that completion uses when
it is completing filenames into an open brace list.
-rw-r--r--Src/utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/Src/utils.c b/Src/utils.c
index dcaac9661..f076df61f 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2515,6 +2515,8 @@ equalsplit(char *s, char **t)
return 0;
}
+static int specialcomma;
+
/* the ztypes table */
/**/
@@ -2614,10 +2616,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