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 compadd -Q -p "${2-}" -f -- ${=1} && _ret=0
78 cur=${words[CURRENT-1]}
79 prev=${words[CURRENT-2]}
83 let _ret && _default -S '' && _ret=0