From: Felipe Contreras Date: Wed, 28 Oct 2020 02:06:55 +0000 (-0600) Subject: completion: fix conflict with bashcomp X-Git-Tag: v2.30.0-rc0~105^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3791968bfe8485353f95e692c5a3891e4a02c5c4;p=thirdparty%2Fgit.git completion: fix conflict with bashcomp We don't want to override the 'complete()' function in zsh, which can be used by bashcomp. Reported-by: Mark Lodato Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index e567062505..b894cb52db 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -21,12 +21,6 @@ # zstyle ':completion:*:*:git:*' script ~/.git-completion.bash # -complete () -{ - # do nothing - return 0 -} - zstyle -T ':completion:*:*:git:*' tag-order && \ zstyle ':completion:*:*:git:*' tag-order 'common-commands' @@ -48,7 +42,11 @@ if [ -z "$script" ]; then test -f $e && script="$e" && break done fi + +local old_complete="$functions[complete]" +functions[complete]=: GIT_SOURCING_ZSH_COMPLETION=y . "$script" +functions[complete]="$old_complete" __gitcomp () {