From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15380 invoked by alias); 28 Jun 2011 02:04:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29515 Received: (qmail 5420 invoked from network); 28 Jun 2011 02:03:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.220.171 as permitted sender) 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= MIME-Version: 1.0 In-Reply-To: <1309211717-9650-1-git-send-email-ft@bewatermyfriend.org> References: <1309211717-9650-1-git-send-email-ft@bewatermyfriend.org> Date: Mon, 27 Jun 2011 19:03:54 -0700 Message-ID: Subject: Re: PATCH: Fall back to file completion if nothing else works From: =?ISO-8859-1?Q?Johan_Sundstr=F6m?= To: Frank Terbeck Cc: zsh workers , Nikolai Weibull Content-Type: multipart/alternative; boundary=bcaec53f8e2175ece304a6bc1436 --bcaec53f8e2175ece304a6bc1436 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Mon, Jun 27, 2011 at 14:55, Frank Terbeck wrote= : > Some people have for third party add-ons to git. `annex' is one such > add-on. Currently "git annex add " 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 will complet= e 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 =96 the completion coul= d be super smart, but it wouldn't be possible to tell, since you can't know i= f 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 fo= o' > > 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. --=20 / Johan Sundstr=F6m, http://ecmanaut.blogspot.com/ --bcaec53f8e2175ece304a6bc1436--