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 <lodato@google.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
aa1f1f8010
commit
3791968bfe
@ -21,12 +21,6 @@
|
|||||||
# zstyle ':completion:*:*:git:*' script ~/.git-completion.bash
|
# zstyle ':completion:*:*:git:*' script ~/.git-completion.bash
|
||||||
#
|
#
|
||||||
|
|
||||||
complete ()
|
|
||||||
{
|
|
||||||
# do nothing
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
zstyle -T ':completion:*:*:git:*' tag-order && \
|
zstyle -T ':completion:*:*:git:*' tag-order && \
|
||||||
zstyle ':completion:*:*:git:*' tag-order 'common-commands'
|
zstyle ':completion:*:*:git:*' tag-order 'common-commands'
|
||||||
|
|
||||||
@ -48,7 +42,11 @@ if [ -z "$script" ]; then
|
|||||||
test -f $e && script="$e" && break
|
test -f $e && script="$e" && break
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local old_complete="$functions[complete]"
|
||||||
|
functions[complete]=:
|
||||||
GIT_SOURCING_ZSH_COMPLETION=y . "$script"
|
GIT_SOURCING_ZSH_COMPLETION=y . "$script"
|
||||||
|
functions[complete]="$old_complete"
|
||||||
|
|
||||||
__gitcomp ()
|
__gitcomp ()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user