diff options
| author | Oliver Kiddle <opk@zsh.org> | 2014-03-03 11:57:56 +0100 |
|---|---|---|
| committer | Oliver Kiddle <opk@zsh.org> | 2014-03-03 11:57:56 +0100 |
| commit | b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33 (patch) | |
| tree | 482819284eed7f40356ef9e2b1113afb13d69dc2 /Src | |
| parent | 32453: fix zcalc default base handling (diff) | |
| download | zsh-b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33.tar zsh-b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33.tar.gz zsh-b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33.tar.bz2 zsh-b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33.tar.lz zsh-b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33.tar.xz zsh-b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33.tar.zst zsh-b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33.zip | |
32436: allow = to be used in ZLS_COLORS patterns if it is quoted or inside parentheses
Diffstat (limited to 'Src')
| -rw-r--r-- | Src/Zle/complist.c | 17 |
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'; |
