From 4e1bd9ebdf14cb1fb11e6a1ca9be1981c983ebd9 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 2 Dec 2021 21:01:28 +0100 Subject: 49630: allow zsh to quote matches from bash completions but include a special case for space suffixes --- ChangeLog | 3 +++ 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 + * 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 -- cgit 1.4.1