зеркало из https://github.com/microsoft/git.git
completion: zsh: fix completion for --no-.. options
This was introduced in upstream's bash script, but never in zsh's:
b221b5ab9b
(completion: collapse extra --no-.. options)
It has been failing since v2.19.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
162f1a5610
Коммит
aa1f1f8010
|
@ -59,10 +59,32 @@ __gitcomp ()
|
|||
case "$cur_" in
|
||||
--*=)
|
||||
;;
|
||||
--no-*)
|
||||
local c IFS=$' \t\n'
|
||||
local -a array
|
||||
for c in ${=1}; do
|
||||
if [[ $c == "--" ]]; then
|
||||
continue
|
||||
fi
|
||||
c="$c${4-}"
|
||||
case $c in
|
||||
--*=|*.) ;;
|
||||
*) c="$c " ;;
|
||||
esac
|
||||
array+=("$c")
|
||||
done
|
||||
compset -P '*[=:]'
|
||||
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
|
||||
;;
|
||||
*)
|
||||
local c IFS=$' \t\n'
|
||||
local -a array
|
||||
for c in ${=1}; do
|
||||
if [[ $c == "--" ]]; then
|
||||
c="--no-...${4-}"
|
||||
array+=("$c ")
|
||||
break
|
||||
fi
|
||||
c="$c${4-}"
|
||||
case $c in
|
||||
--*=*|*.) ;;
|
||||
|
|
Загрузка…
Ссылка в новой задаче