From: Holger Weiss <holger@CIS.FU-Berlin.DE>
To: Zsh Workers <zsh-workers@zsh.org>
Subject: [PATCH] _git shouldn't return 0 if there are no matches
Date: Thu, 27 May 2010 00:57:02 +0200 [thread overview]
Message-ID: <20100526225702.GA15615202@CIS.FU-Berlin.DE> (raw)
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
next reply other threads:[~2010-05-26 23:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 22:57 Holger Weiss [this message]
2010-05-27 8:22 ` Nikolai Weibull
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100526225702.GA15615202@CIS.FU-Berlin.DE \
--to=holger@cis.fu-berlin.de \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).