From d7c7498378e8201d5f5e6eca621600ca9f78abb6 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Wed, 30 Apr 2014 04:00:32 -0500 Subject: [PATCH] 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 --- git-completion.zsh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/git-completion.zsh b/git-completion.zsh index e567062..b894cb5 100644 --- a/git-completion.zsh +++ b/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 () {