Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _git shouldn't return 0 if there are no matches
- X-seq: zsh-workers 27977
- From: Holger Weiss <holger@xxxxxxxxxxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxx>
- Subject: [PATCH] _git shouldn't return 0 if there are no matches
- Date: Thu, 27 May 2010 00:57:02 +0200
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Zsh Workers <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author