Skip to content

Commit

Permalink
completion: fix warning for zsh
Browse files Browse the repository at this point in the history
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 <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed Nov 29, 2012
1 parent bad27f4 commit 9cd67bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9cd67bd

Please sign in to comment.