zsh-workers
 help / color / mirror / code / Atom feed
From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh workers <zsh-workers@zsh.org>
Cc: Nikolai Weibull <now@bitwi.se>, Mikael Magnusson <mikachu@gmail.com>
Subject: PATCH: (1/3) _git: Fall back to file completion if nothing else works
Date: Wed, 29 Jun 2011 22:37:11 +0200	[thread overview]
Message-ID: <1309379833-31315-2-git-send-email-ft@bewatermyfriend.org> (raw)
In-Reply-To: <1309379833-31315-1-git-send-email-ft@bewatermyfriend.org>

---
 Completion/Unix/Command/_git |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e062705..362ec78 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6023,7 +6023,12 @@ _git() {
       (option-or-argument)
         curcontext=${curcontext%:*:*}:git-$words[1]:
 
-        _call_function ret _git-$words[1]
+        if (( ${+functions[_git-$words[1]]} )); then
+            _git-$words[1]
+        else
+            _path_files
+            ret=$?
+        fi
         ;;
     esac
   else
-- 
1.7.6


  reply	other threads:[~2011-06-29 20:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27 21:55 PATCH: " Frank Terbeck
2011-06-28  2:03 ` Johan Sundström
2011-06-28  5:17   ` Frank Terbeck
2011-06-29 21:46     ` Johan Sundström
2011-06-29 22:33       ` Frank Terbeck
2011-06-29 20:37 ` PATCH: (0/3) _git fixes and enhancements Frank Terbeck
2011-06-29 20:37   ` Frank Terbeck [this message]
2011-06-29 20:37   ` PATCH: (2/3) _git: Pick up addon completions from $fpath Frank Terbeck
2011-06-29 21:15     ` Frank Terbeck
2011-06-29 20:37   ` PATCH: (3/3) _git: re-add `user-commands' support again Frank Terbeck
2011-07-22 11:54     ` Nikolai Weibull
2011-07-22 11:55     ` Nikolai Weibull
2011-07-22 12:00       ` Frank Terbeck
2011-07-22 12:48         ` Nikolai Weibull
2011-07-22 12:49           ` Frank Terbeck
2011-07-22 13:05             ` Nikolai Weibull
2011-06-29 21:30   ` PATCH: (4/3) _git-buildpackage: use a #desc: line Frank Terbeck
2011-07-20 18:11     ` Nikolai Weibull
2011-07-20 18:22       ` Frank Terbeck
2011-07-22 11:58         ` Nikolai Weibull
2011-07-22 12:01           ` Frank Terbeck
2011-06-30  9:17   ` PATCH: (5/3) _git: Make file-completion fallback optional Frank Terbeck
2011-07-22  9:35     ` Nikolai Weibull
2011-10-27  8:00       ` 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=1309379833-31315-2-git-send-email-ft@bewatermyfriend.org \
    --to=ft@bewatermyfriend.org \
    --cc=mikachu@gmail.com \
    --cc=now@bitwi.se \
    --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).