Merge branch 'ab/i18n-scripts-basic'
[gitweb.git] / contrib / completion / git-completion.bash
index 70897b30260cb449bcd7918f9c8542a433fb2f36..bb8d7d0878994eb3d53163c330de44d8c0d48b3f 100755 (executable)
@@ -1534,7 +1534,7 @@ __git_log_common_options="
 __git_log_gitk_options="
        --dense --sparse --full-history
        --simplify-merges --simplify-by-decoration
-       --left-right
+       --left-right --notes --no-notes
 "
 # Options that go well for log and shortlog (not gitk)
 __git_log_shortlog_options="
@@ -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