Skip to content

Commit 1a0c9a3

Browse files
committed
Revert "completion: don't declare 'local words' to make zsh happy"
This reverts commit 3bee6a4, as the fix that will be used by upstream zsh folks should make it unnecessary.
1 parent dad4277 commit 1a0c9a3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

contrib/completion/git-completion.bash

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,11 +2608,9 @@ _git ()
26082608
if [[ -n ${ZSH_VERSION-} ]]; then
26092609
emulate -L bash
26102610
setopt KSH_TYPESET
2611-
else
2612-
local words
26132611
fi
26142612

2615-
local cur cword prev
2613+
local cur words cword prev
26162614
_get_comp_words_by_ref -n =: cur words cword prev
26172615
while [ $c -lt $cword ]; do
26182616
i="${words[c]}"
@@ -2661,11 +2659,9 @@ _gitk ()
26612659
if [[ -n ${ZSH_VERSION-} ]]; then
26622660
emulate -L bash
26632661
setopt KSH_TYPESET
2664-
else
2665-
local words
26662662
fi
26672663

2668-
local cur cword prev
2664+
local cur words cword prev
26692665
_get_comp_words_by_ref -n =: cur words cword prev
26702666

26712667
__git_has_doubledash && return

0 commit comments

Comments
 (0)