* [PATCH] completion: fix warning for zsh
@ 2012-11-29 8:20 Felipe Contreras
2012-11-29 18:02 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Felipe Contreras @ 2012-11-29 8:20 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Felipe Contreras
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>
---
contrib/completion/git-completion.bash | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index af13fcc..0b77eb1 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
--
1.8.0.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-29 18:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-29 8:20 [PATCH] completion: fix warning for zsh Felipe Contreras
2012-11-29 18:02 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox