Code

Merge branch 'jk/maint-rev-list-nul'
[git.git] / contrib / completion / git-completion.bash
index feab651be83c490a213e97a27fa0fff6820ad9a6..168669bbf79cb33c527a688fb906e276beadaf79 100755 (executable)
@@ -1131,7 +1131,7 @@ _git_diff ()
        case "$cur" in
        --*)
                __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
-                       --base --ours --theirs
+                       --base --ours --theirs --no-index
                        $__git_diff_common_options
                        "
                return
@@ -2345,7 +2345,7 @@ _git ()
 {
        local i c=1 command __git_dir
 
-       if [[ -n $ZSH_VERSION ]]; then
+       if [[ -n ${ZSH_VERSION-} ]]; then
                emulate -L bash
                setopt KSH_TYPESET
        fi
@@ -2394,7 +2394,7 @@ _git ()
 
 _gitk ()
 {
-       if [[ -n $ZSH_VERSION ]]; then
+       if [[ -n ${ZSH_VERSION-} ]]; then
                emulate -L bash
                setopt KSH_TYPESET
        fi
@@ -2434,7 +2434,7 @@ complete -o bashdefault -o default -o nospace -F _git git.exe 2>/dev/null \
        || complete -o default -o nospace -F _git git.exe
 fi
 
-if [[ -n $ZSH_VERSION ]]; then
+if [[ -n ${ZSH_VERSION-} ]]; then
        shopt () {
                local option
                if [ $# -ne 2 ]; then