Zsh Mailing List Archive
Messages sorted by:
Re: PATCH: Fall back to file completion if nothing else works
- X-seq: zsh-workers 29515
- From: Johan Sundström <oyasumi@xxxxxxxxx>
- To: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: Fall back to file completion if nothing else works
- Date: Mon, 27 Jun 2011 19:03:54 -0700
- Cc: zsh workers <zsh-workers@xxxxxxx>, Nikolai Weibull <now@xxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=++nTD768xOAeJ5uUYw3vIF+XjSMmiqtbvbxza53UORg=; b=u4Puzh16iXJt0dU/kMoayhEnKJll1pzJ8eh6oxbOdsqAyDNUK6l+wx6gp8WnHWq9kr p+zBAj3FxLEw7T7472fydE6oTQW3sJXr7PNABtWqFpH51lm3VYhUjtXwnxWldW2WbXJX AgkIhzU5j5aC42BMByMK7LT6hB4ECWiEu6II4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=lU5wdrUMl+bBPEPeb4ZxrgMehF5H49BP5AcZi9IFgiakMCSA/EPT+kzLDCxzsV//a3 ujVAVdv/zmlD2Od6w/X68cNodZRG8a62FkD9PIgzAl8yk7zL5q9Cc4tx2TfZgyrWpdW0 Sz1CR/HhFRhsSA1B1usjQXTRH3Lcark50rIhA=
- In-reply-to: <firstname.lastname@example.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <email@example.com>
On Mon, Jun 27, 2011 at 14:55, Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> 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
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/
Messages sorted by: