diff options
author | Oliver Kiddle <opk@zsh.org> | 2021-12-02 21:01:28 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2021-12-02 21:03:57 +0100 |
commit | 4e1bd9ebdf14cb1fb11e6a1ca9be1981c983ebd9 (patch) | |
tree | 35b294e7b7a5467ed046471101cb0dd5ac6b9e94 | |
parent | 9fc0e319c976c4fe72ba113493a25dde26f68f75 (diff) | |
download | zsh-4e1bd9ebdf14cb1fb11e6a1ca9be1981c983ebd9.tar.gz zsh-4e1bd9ebdf14cb1fb11e6a1ca9be1981c983ebd9.tar.xz zsh-4e1bd9ebdf14cb1fb11e6a1ca9be1981c983ebd9.zip |
49630: allow zsh to quote matches from bash completions but include a special case for space suffixes
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/bashcompinit | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index f18fe4e94..140a3f07c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2021-12-02 Oliver Kiddle <opk@zsh.org> + * 49630: Completion/bashcompinit: allow zsh to quote matches but + include a special case for space suffixes + * 49631: Completion/Unix/Command/_logger: new logger completion * 49629: Completion/Linux/Command/_perf: new Linux perf completion diff --git a/Completion/bashcompinit b/Completion/bashcompinit index b278ac8f4..adb659ca1 100644 --- a/Completion/bashcompinit +++ b/Completion/bashcompinit @@ -24,9 +24,10 @@ _bash_complete() { if [[ ${argv[${argv[(I)filenames]:-0}-1]} = -o ]]; then compset -P '*/' && matches=( ${matches##*/} ) compset -S '/*' && matches=( ${matches%%/*} ) - compadd -Q -f "${suf[@]}" -a matches && ret=0 + compadd -f "${suf[@]}" -a matches && ret=0 else - compadd -Q "${suf[@]}" -a matches && ret=0 + compadd "${suf[@]}" - "${(@)${(Q@)matches}:#*\ }" && ret=0 + compadd -S ' ' - ${${(M)${(Q)matches}:#*\ }% } && ret=0 fi fi |