3 # zsh completion wrapper for git
5 # You need git's bash completion script installed somewhere, by default on the
6 # same directory as this script.
8 # If your script is on ~/.git-completion.sh instead, you can configure it on
11 # zstyle ':completion:*:*:git:*' script ~/.git-completion.sh
13 # The recommended way to install this script is to copy to
14 # '~/.zsh/completion/_git', and then add the following to your ~/.zshrc file:
16 # fpath=(~/.zsh/completion $fpath)
24 zstyle
-s ":completion:*:*:git:*" script script
25 test -z "$script" && script="$(dirname ${funcsourcetrace[1]%:*})"/git-completion.bash
26 ZSH_VERSION
='' .
"$script"
32 local cur_
="${3-$cur}"
49 compadd
-Q -S '' -p "${2-}" -a -- array
&& _ret
=0
60 compadd
-Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
69 cur=${words[CURRENT-1]}
70 prev=${words[CURRENT-2]}
74 let _ret && _default -S '' && _ret=0