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 | |
parent | 965d7305e57b9b1a009af71368fcbf6da4e756a8 (diff) | |
download | zsh-b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33.tar.gz zsh-b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33.tar.xz zsh-b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33.zip |
32436: allow = to be used in ZLS_COLORS patterns if it is quoted or inside parentheses
-rw-r--r-- | ChangeLog | 39 | ||||
-rw-r--r-- | Src/Zle/complist.c | 17 |
2 files changed, 37 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog index 1cd1431d5..d35f5b049 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-03-03 Oliver Kiddle <opk@zsh.org> + + * 32436: Src/Zle/complist.c: allow = to be used in ZLS_COLORS + patterns if it is quoted or inside parentheses + 2014-03-01 Peter Stephenson <p.w.stephenson@ntlworld.com> * 32453: Functions/Misc/zcalc: fix default base handling. @@ -18,7 +23,7 @@ Completion/Unix/Command/_rm: improved quoting for ignore-line style. -2014-02-24 Oliver Kiddle <opk@zsh.org> +2014-02-24 Oliver Kiddle <opk@zsh.org> * unposted: Doc/Zsh/compsys.yo: fix typo @@ -100,7 +105,7 @@ * 32388: Doc/Zsh/mod_zutil.yo, Src/Modules/zutil.c: zparseopts -K preserves individual associative array elements -2014-02-14 Oliver Kiddle <opk@zsh.org> +2014-02-14 Oliver Kiddle <opk@zsh.org> * 32361: Src/Zle/zle_tricky.c: don't reset lastline before completion @@ -118,7 +123,7 @@ * Martin Vaeth: 32356: Util/helpfiles: fix a typo. -2014-02-05 Oliver Kiddle <opk@zsh.org> +2014-02-05 Oliver Kiddle <opk@zsh.org> * 32355: Doc/Zsh/zle.yo Test/X02zlevi.ztst Test/comptest: document and test vi mode undo changes @@ -153,7 +158,7 @@ unset for better compatibility in emulation modes; for the same reason, remove the readonly flag from $_ -2014-01-31 Oliver Kiddle <opk@zsh.org> +2014-01-31 Oliver Kiddle <opk@zsh.org> * 32314: Src/Zle/zle_main.c, Src/Zle/zle_tricky.c, Src/Zle/zle_utils.c, Src/Zle/zle_vi.c: merge undo events @@ -1560,7 +1565,7 @@ * users/17665: Doc/Zsh/options.yo, Src/math.c, Src/options.c, Src/zsh.h, Test/C01arith.ztst: add FORCE_FLOAT option. -2013-02-27 Oliver Kiddle <opk@zsh.org> +2013-02-27 Oliver Kiddle <opk@zsh.org> * 31076: Completion/Linux/Command/_yast, Completion/Unix/Type/_pids, Completion/Unix/Type/_pdf: @@ -1581,7 +1586,7 @@ * 31060: Src/builtin.c: "+" before a flag for "functions" or "autoload" should suppress display of function body. -2013-02-21 Oliver Kiddle <opk@zsh.org> +2013-02-21 Oliver Kiddle <opk@zsh.org> * 31058: Completion/Zsh/Command/_fc, Completion/Unix/Command/_cut, Completion/Unix/Command/_sed, Completion/Unix/Command/_wget, @@ -1593,7 +1598,7 @@ * 31055: Completion/compaudit: missing '$' in search of /proc file system. -2013-02-12 Oliver Kiddle <opk@zsh.org> +2013-02-12 Oliver Kiddle <opk@zsh.org> * 31041: Test/comptest, Test/X02zlevi.ztst: add support for testing line editor widgets from the test suite @@ -1601,7 +1606,7 @@ * unposted: Etc/zsh-development-guide: remove duplication in git guidelines -2013-02-09 Oliver Kiddle <opk@zsh.org> +2013-02-09 Oliver Kiddle <opk@zsh.org> * Morita Sho: 31038: Completion/Unix/Type/_terminals: add location of terminfo entries on Debian @@ -1658,7 +1663,7 @@ modifiers :wq operating on an empty string crashed the shell. The shell isn't supposed to crash. -2013-01-20 Oliver Kiddle <opk@zsh.org> +2013-01-20 Oliver Kiddle <opk@zsh.org> * 30987: Completion/X/Command/_xrandr: only call xrandr when necessary and use _call_program @@ -1716,7 +1721,7 @@ * unposted: Config/version.mk: zsh 5.0.1. -2012-12-18 Oliver Kiddle <opk@zsh.org> +2012-12-18 Oliver Kiddle <opk@zsh.org> * 30877: Etc/zsh-development-guide: document git workflow @@ -1750,7 +1755,7 @@ * users/17445: Src/math.c, Test/C01arith.ztst: fix handling of leading zeroes in floating point. -2012-11-20 Oliver Kiddle <opk@zsh.org> +2012-11-20 Oliver Kiddle <opk@zsh.org> * 30811: Completion/Linux/Command/_btrfs, Completion/Unix/Command/_mount: new completion for btrfs and @@ -1765,7 +1770,7 @@ * users/17042: Src/jobs.c: don't stomp the environment in "jobs -Z" unless we've first copied it to new memory. -2012-11-16 Oliver Kiddle <opk@zsh.org> +2012-11-16 Oliver Kiddle <opk@zsh.org> * 30802: Completion/Unix/Command/_find: add new command switches @@ -1783,7 +1788,7 @@ * 30800: Michal Halenka: Completion/Unix/Command/_arping: fix option. -2012-11-12 Oliver Kiddle <opk@zsh.org> +2012-11-12 Oliver Kiddle <opk@zsh.org> * 30795: Completion/Unix/Command/_xz, Completion/Unix/Command/_bzip2: new xz completion, new bzip2 options @@ -1791,7 +1796,7 @@ * 30794: Completion/Unix/Command/_irssi, Completion/Unix/Command/_mutt: update for new options -2012-11-11 Oliver Kiddle <opk@zsh.org> +2012-11-11 Oliver Kiddle <opk@zsh.org> * 30793: Completion/Unix/Command/_getent, Completion/Unix/Command/_iconv, Completion/Unix/Command/_ldd: @@ -1811,7 +1816,7 @@ * 30780: Doc/Zsh/builds.yo: document that set -o failures are hard but setopt failures are soft. -2012-11-07 Oliver Kiddle <opk@zsh.org> +2012-11-07 Oliver Kiddle <opk@zsh.org> * Benjamin R. Haskell: 30737: Completion/Unix/Command/_git: make custom completion functions for git aliases easier @@ -1880,7 +1885,7 @@ Test/C04funcdef.ztst: emulate command evaluations should apply sticky emulation to autoloads, too. -2012-10-07 Oliver Kiddle <opk@zsh.org> +2012-10-07 Oliver Kiddle <opk@zsh.org> * unposted: Completion/Unix/Command/_webbrowser, Completion/Unix/Type/_pspdf: add evince, zathura, dwb @@ -1934,7 +1939,7 @@ Functions/VCS_Info/Backends/VCS_INFO_detect_fossil: Fix fossil detection on unix -2012-09-28 Oliver Kiddle <opk@zsh.org> +2012-09-28 Oliver Kiddle <opk@zsh.org> * 30697: Completion/Unix/Command/_dbus: new completion definition 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'; |