mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
49630: allow zsh to quote matches from bash completions but include a special case for space suffixes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user