summaryrefslogtreecommitdiff
path: root/Src/Zle/complist.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-03-03 23:52:20 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2014-03-03 23:52:20 -0800
commitff6d8115efaa8d50ec107508c8678ec49d300ed6 (patch)
treef05ff427c1665d115c903f2f203359f9f730f4c7 /Src/Zle/complist.c
parente6d99759e8aff6f17ff08d977c7e7471ac0ebec5 (diff)
parent3c25cb29aba4d4c1a907aa29db48c36d8dbac18e (diff)
downloadzsh-ff6d8115efaa8d50ec107508c8678ec49d300ed6.tar.gz
zsh-ff6d8115efaa8d50ec107508c8678ec49d300ed6.zip
Merge branch 'master' of git://git.code.sf.net/p/zsh/code
Diffstat (limited to 'Src/Zle/complist.c')
-rw-r--r--Src/Zle/complist.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index b852ee99f..5e5ba9f20 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -383,12 +383,25 @@ getcoldef(char *s)
} else if (*s == '=') {
char *p = ++s, *t, *cols[MAX_POS];
int ncols = 0;
+ int nesting = 0;
Patprog prog;
/* This is for a pattern. */
- while (*s && *s != '=')
- s++;
+ while (*s && (nesting || *s != '=')) {
+ switch (*s++) {
+ case '\\':
+ if (*s)
+ s++;
+ break;
+ case '(':
+ nesting++;
+ break;
+ case ')':
+ nesting--;
+ break;
+ }
+ }
if (!*s)
return s;
*s++ = '\0';