zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] __git_commit_objects: do not use _guard, but a pattern
@ 2015-05-19  6:27 Daniel Hahler
  0 siblings, 0 replies; only message in thread
From: Daniel Hahler @ 2015-05-19  6:27 UTC (permalink / raw)
  To: zsh-workers

From: Daniel Hahler <git@thequod.de>

With using `_guard` there like it's been done, the completion could not
be selected, probably because of the call to `_message` there.

This changes it to use only the logic/check from `_guard` that we want
here.
---
 Completion/Unix/Command/_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index a0ec343..fb9cae1 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5657,7 +5657,7 @@ __git_commit_objects () {
   declare -a commits
 
   # Abort if the argument does not match a commit hash (including empty).
-  _guard '[[:xdigit:]](#c,40)' || return 1
+  [[ "$PREFIX$SUFFIX" == [[:xdigit:]](#c1,40) ]] || return 1
 
   # Note: the after-the-colon part must be unique across the entire array;
   # see workers/34768
-- 
2.4.0.dirty


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-19  6:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19  6:27 [PATCH] __git_commit_objects: do not use _guard, but a pattern Daniel Hahler

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).