Code

Merge branch 'fc/completion-zsh' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2011 16:36:33 +0000 (09:36 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2011 16:36:33 +0000 (09:36 -0700)
* fc/completion-zsh:
  git-completion: fix regression in zsh support

contrib/completion/git-completion.bash

index 840ae38760a5de84b369b208a52cc579ce478378..a7d20df233c2be8dc36452b02fb5fcabf168c69a 100755 (executable)
@@ -2710,6 +2710,10 @@ _git ()
        if [[ -n ${ZSH_VERSION-} ]]; then
                emulate -L bash
                setopt KSH_TYPESET
+
+               # workaround zsh's bug that leaves 'words' as a special
+               # variable in versions < 4.3.12
+               typeset -h words
        fi
 
        local cur words cword
@@ -2761,6 +2765,10 @@ _gitk ()
        if [[ -n ${ZSH_VERSION-} ]]; then
                emulate -L bash
                setopt KSH_TYPESET
+
+               # workaround zsh's bug that leaves 'words' as a special
+               # variable in versions < 4.3.12
+               typeset -h words
        fi
 
        __git_has_doubledash && return