completion: synchronize zsh wrapper
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 8 May 2013 07:37:01 +0000 (02:37 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 May 2013 18:44:32 +0000 (11:44 -0700)
So it's closer to the full zsh wrapper.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash
index 84dbf19948de6685ee769aa514e3179989b802de..b61f6c2731b45cb2c3b649b8d216940b8c489172 100644 (file)
@@ -2663,7 +2663,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
                                --*=*|*.) ;;
                                *) c="$c " ;;
                                esac
-                               array[$#array+1]="$c"
+                               array+=("$c")
                        done
                        compset -P '*[=:]'
                        compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
@@ -2696,7 +2696,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
                prev=${words[CURRENT-1]}
                let cword=CURRENT-1
                emulate ksh -c __${service}_main
-               let _ret && _default -S '' && _ret=0
+               let _ret && _default && _ret=0
                return _ret
        }