diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2013-12-28 00:30:17 -0800 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2013-12-28 00:30:17 -0800 |
commit | 9e4468d38d9f92c2d849c56b31525c45127b9623 (patch) | |
tree | 0dac037a1f1747723ee6e657b8012bb55f3e64fc | |
parent | 083328e697ba4251520c8fa42fe386174c5a41e5 (diff) | |
download | zsh-9e4468d38d9f92c2d849c56b31525c45127b9623.tar.gz zsh-9e4468d38d9f92c2d849c56b31525c45127b9623.tar.xz zsh-9e4468d38d9f92c2d849c56b31525c45127b9623.zip |
32186: fix bad backreference; handle glob patterns with backslashed quotes
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Base/Completer/_expand | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index e7bd54f05..6b74faefc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-12-28 Barton E. Schaefer <schaefer@zsh.org> + + * 32186: Completion/Base/Completer/_expand: fix bad backreference; + handle glob patterns that include backslashed quote characters + 2013-12-26 Barton E. Schaefer <schaefer@zsh.org> * unposted (cf. Jun Takimoto: 32184): Test/comptest, diff --git a/Completion/Base/Completer/_expand b/Completion/Base/Completer/_expand index 44954a2a8..e52144cb7 100644 --- a/Completion/Base/Completer/_expand +++ b/Completion/Base/Completer/_expand @@ -103,8 +103,8 @@ subd=("$exp[@]") # Now try globbing. [[ "$force" = *g* ]] || zstyle -T ":completion:${curcontext}:" glob && - eval 'exp=( ${~exp//(#b)\\[ -]/$match[1]} ); exp=( ${(q)exp} )' 2>/dev/null + eval 'exp=( ${~exp//(#b)\\([ \"'"\'"' +])/$match[1]} ); exp=( ${(q)exp} )' 2>/dev/null ### Don't remember why we once used this instead of the (q) above. # eval 'exp=( ${~exp} ); exp=( ${exp//(#b)([][()|*?^#~<>\\=])/\\${match[1]}} )' 2>/dev/null |