From: Junio C Hamano Date: Sun, 2 Jun 2013 22:47:33 +0000 (-0700) Subject: Merge branch 'fc/zsh-leftover-bits' X-Git-Tag: v1.8.4-rc0~243 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6bf931a54fd66826f28d2808b7ad822024764d41?ds=inline;hp=-c Merge branch 'fc/zsh-leftover-bits' * fc/zsh-leftover-bits: completion: zsh: improve bash script loading completion: synchronize zsh wrapper completion: cleanup zsh wrapper --- 6bf931a54fd66826f28d2808b7ad822024764d41 diff --combined contrib/completion/git-completion.bash index 1c35eef56a,b61f6c2731..adeff8d9ba --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@@ -1831,7 -1831,7 +1831,7 @@@ _git_config ( local remote="${prev#remote.}" remote="${remote%.fetch}" if [ -z "$cur" ]; then - __gitcompadd "refs/heads/" "" "" "" + __gitcomp_nl "refs/heads/" "" "" "" return fi __gitcomp_nl "$(__git_refs_remotes "$remote")" @@@ -2451,7 -2451,7 +2451,7 @@@ _git_svn ( --no-metadata --use-svm-props --use-svnsync-props --log-window-size= --no-checkout --quiet --repack-flags --use-log-author --localtime - --ignore-paths= $remote_opts + --ignore-paths= --include-paths= $remote_opts " local init_opts=" --template= --shared= --trunk= --tags= @@@ -2663,7 -2663,7 +2663,7 @@@ if [[ -n ${ZSH_VERSION-} ]]; the --*=*|*.) ;; *) c="$c " ;; esac - array[$#array+1]="$c" + array+=("$c") done compset -P '*[=:]' compadd -Q -S '' -p "${2-}" -a -- array && _ret=0 @@@ -2689,22 -2689,14 +2689,14 @@@ compadd -Q -p "${2-}" -f -- ${=1} && _ret=0 } - __git_zsh_helper () - { - emulate -L ksh - local cur cword prev - cur=${words[CURRENT-1]} - prev=${words[CURRENT-2]} - let cword=CURRENT-1 - __${service}_main - } - _git () { - emulate -L zsh - local _ret=1 - __git_zsh_helper - let _ret && _default -S '' && _ret=0 + local _ret=1 cur cword prev + cur=${words[CURRENT]} + prev=${words[CURRENT-1]} + let cword=CURRENT-1 + emulate ksh -c __${service}_main + let _ret && _default && _ret=0 return _ret }