Felipe Contreras committed 9cd67bd

completion: fix warning for zsh

Otherwise the user might get something like: 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 <>

  • Participants
  • Parent commits bad27f4

Comments (0)

Files changed (1)


 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