From: "Johan Sundström" <oyasumi@gmail.com>
To: Frank Terbeck <ft@bewatermyfriend.org>
Cc: zsh workers <zsh-workers@zsh.org>, Nikolai Weibull <now@bitwi.se>
Subject: Re: PATCH: Fall back to file completion if nothing else works
Date: Mon, 27 Jun 2011 19:03:54 -0700 [thread overview]
Message-ID: <BANLkTikpp01honaQfpX04OQF3znDaUg_6A@mail.gmail.com> (raw)
In-Reply-To: <1309211717-9650-1-git-send-email-ft@bewatermyfriend.org>
[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]
On Mon, Jun 27, 2011 at 14:55, Frank Terbeck <ft@bewatermyfriend.org> wrote:
> Some people have for third party add-ons to git. `annex' is one such
> add-on. Currently "git annex add <tab>" does nothing, because there is
> no special subcommand handling function.
>
> _git should really fallback to file name completion in such cases. This
> patch does exactly that.
>
-0. As I read this, you're proposing going from 0 (or close to it?) to an
unbounded number of completion false positives.
Before such a patch, you can be sure that git <anything> <tab> will complete
something that is legal in this spot: a tag or branch name, for instance, a
file which has not yet been added to the index, a flag for this command, et
cetera.
After it, one can never know whether zsh completed a filename because that
particular filename was legal in this context, or just because it didn't
know how to complete something in the given context – the completion could
be super smart, but it wouldn't be possible to tell, since you can't know if
a completion was legal without knowing git inside and out, or from running
the command line.
I'm wondering how we should handle third party add ons to commands. _git
> used provide the `user-commands' style to do stuff like this:
>
> % zstyle ':completion:*:*:git:*' user-commands foo:'description for foo'
>
> You could even define `_git-foo()' to have special handling.
>
I think that sounds like a better way to enable the behaviour you seek, for
people that specifically want it.
--
/ Johan Sundström, http://ecmanaut.blogspot.com/
next prev parent reply other threads:[~2011-06-28 2:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-27 21:55 Frank Terbeck
2011-06-28 2:03 ` Johan Sundström [this message]
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 ` PATCH: (1/3) _git: Fall back to file completion if nothing else works Frank Terbeck
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=BANLkTikpp01honaQfpX04OQF3znDaUg_6A@mail.gmail.com \
--to=oyasumi@gmail.com \
--cc=ft@bewatermyfriend.org \
--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).