* [PATCH] _git shouldn't return 0 if there are no matches
@ 2010-05-26 22:57 Holger Weiss
2010-05-27 8:22 ` Nikolai Weibull
0 siblings, 1 reply; 2+ messages in thread
From: Holger Weiss @ 2010-05-26 22:57 UTC (permalink / raw)
To: Zsh Workers
This patch fixes the problem that the _git completion function returns 0
even if no matches were generated (which leads to any additional
completers not being executed).
_git handles the completion for a sub-command such as "git foo" by
calling the function _git-foo via _call_function. Without this patch,
_git then returns the status returned by _call_function (which is 0 if
_call_function was able to call _git-foo) instead of the status returned
by _git-foo.
---
Completion/Unix/Command/_git | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index aef5e7c..cb06d57 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4471,11 +4471,13 @@ if [[ $service == git ]]; then
else
curcontext="${curcontext%:*:*}:git-$words[1]:"
_call_function ret _git-$words[1]
+ return ret
fi
;;
esac
else
_call_function ret _$service
+ return ret
fi
}
--
Holger
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-27 8:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-26 22:57 [PATCH] _git shouldn't return 0 if there are no matches Holger Weiss
2010-05-27 8:22 ` Nikolai Weibull
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).