mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-05-08 00:26:18 +02:00
49630: allow zsh to quote matches from bash completions but include a special case for space suffixes
This commit is contained in:
parent
9fc0e319c9
commit
4e1bd9ebdf
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue