diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2020-05-05 13:32:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 20:32:52 +0200 |
commit | 0736a3749a9c9ae4ba3096b0b6c55250f19fef17 (patch) | |
tree | 4114d2b757531a688f420b6fa738e3ad7de691bc /plugins/gitfast/_git | |
parent | ff987384cf721e7e0812636dea8100b485968bb2 (diff) | |
download | zsh-0736a3749a9c9ae4ba3096b0b6c55250f19fef17.tar.gz zsh-0736a3749a9c9ae4ba3096b0b6c55250f19fef17.tar.bz2 zsh-0736a3749a9c9ae4ba3096b0b6c55250f19fef17.zip |
gitfast: proper synchronization (#8550)
Diffstat (limited to 'plugins/gitfast/_git')
-rw-r--r-- | plugins/gitfast/_git | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/plugins/gitfast/_git b/plugins/gitfast/_git index 886bf95d1..78a6dbb3d 100644 --- a/plugins/gitfast/_git +++ b/plugins/gitfast/_git @@ -30,7 +30,7 @@ if [ -z "$script" ]; then local -a locations local e locations=( - $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash + "$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash" '/etc/bash_completion.d/git' # fedora, old debian '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian '/usr/share/bash-completion/git' # gentoo @@ -39,7 +39,7 @@ if [ -z "$script" ]; then test -f $e && script="$e" && break done fi -GIT_SOURCING_ZSH_COMPLETION=y . "$script" +ZSH_VERSION='' . "$script" __gitcomp () { @@ -93,22 +93,13 @@ __gitcomp_nl_append () compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 } -__gitcomp_file_direct () -{ - emulate -L zsh - - local IFS=$'\n' - compset -P '*[=:]' - compadd -f -- ${=1} && _ret=0 -} - __gitcomp_file () { emulate -L zsh local IFS=$'\n' compset -P '*[=:]' - compadd -p "${2-}" -f -- ${=1} && _ret=0 + compadd -Q -p "${2-}" -f -- ${=1} && _ret=0 } __git_zsh_bash_func () @@ -232,8 +223,10 @@ _git () if (( $+functions[__${service}_zsh_main] )); then __${service}_zsh_main - else + elif (( $+functions[__${service}_main] )); then emulate ksh -c __${service}_main + elif (( $+functions[_${service}] )); then + emulate ksh -c _${service} fi let _ret && _default && _ret=0 |