mirror of
https://github.com/git/git.git
synced 2026-03-15 03:00:07 +01:00
Merge branch 'sg/completion-updates' into next
* sg/completion-updates: Revert "completion: don't declare 'local words' to make zsh happy" git-completion: fix regression in zsh support
This commit is contained in:
@@ -2608,11 +2608,13 @@ _git ()
|
||||
if [[ -n ${ZSH_VERSION-} ]]; then
|
||||
emulate -L bash
|
||||
setopt KSH_TYPESET
|
||||
else
|
||||
local words
|
||||
|
||||
# workaround zsh's bug that leaves 'words' as a special
|
||||
# variable in versions < 4.3.12
|
||||
typeset -h words
|
||||
fi
|
||||
|
||||
local cur cword prev
|
||||
local cur words cword prev
|
||||
_get_comp_words_by_ref -n =: cur words cword prev
|
||||
while [ $c -lt $cword ]; do
|
||||
i="${words[c]}"
|
||||
@@ -2661,11 +2663,13 @@ _gitk ()
|
||||
if [[ -n ${ZSH_VERSION-} ]]; then
|
||||
emulate -L bash
|
||||
setopt KSH_TYPESET
|
||||
else
|
||||
local words
|
||||
|
||||
# workaround zsh's bug that leaves 'words' as a special
|
||||
# variable in versions < 4.3.12
|
||||
typeset -h words
|
||||
fi
|
||||
|
||||
local cur cword prev
|
||||
local cur words cword prev
|
||||
_get_comp_words_by_ref -n =: cur words cword prev
|
||||
|
||||
__git_has_doubledash && return
|
||||
|
||||
Reference in New Issue
Block a user