From: Felipe Contreras Date: Thu, 29 Nov 2012 08:20:57 +0000 (+0100) Subject: completion: fix warning for zsh X-Git-Tag: v1.8.1-rc0~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9cd67bd2efe98968531cb15cb0d32abdc79e06c1;p=thirdparty%2Fgit.git completion: fix warning for zsh Otherwise the user might get something like: git-completion.sh:2466: command not found: compdef If this script is loaded before compinit. The script would work either way, but let's not be more annoying to the user. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index af13fcc440..0b77eb1fa4 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2404,6 +2404,8 @@ __gitk_main () if [[ -n ${ZSH_VERSION-} ]]; then echo "WARNING: this script is deprecated, please see git-completion.zsh" 1>&2 + autoload -U +X compinit && compinit + __gitcomp () { emulate -L zsh