Skip to content

Commit 9cd67bd

Browse files
felipecgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bad27f4 commit 9cd67bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contrib/completion/git-completion.bash

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,6 +2404,8 @@ __gitk_main ()
24042404
if [[ -n ${ZSH_VERSION-} ]]; then
24052405
echo "WARNING: this script is deprecated, please see git-completion.zsh" 1>&2
24062406

2407+
autoload -U +X compinit && compinit
2408+
24072409
__gitcomp ()
24082410
{
24092411
emulate -L zsh

0 commit comments

Comments
 (0)