From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5867 invoked by alias); 11 Jan 2014 05:34:41 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18311 Received: (qmail 16854 invoked from network); 11 Jan 2014 05:34:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140110213433.ZM22191@torch.brasslantern.com> Date: Fri, 10 Jan 2014 21:34:33 -0800 In-reply-to: Comments: In reply to "Keerthan jai.c" "Approximate file path completion for git?" (Jan 10, 11:50pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Approximate file path completion for git? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 10, 11:50pm, Keerthan jai.c wrote: } } I'm unable to use approximate path completion for git. } Example: % git add a/b/c } } Is this a bug, or has this feature been disabled for git? Hmm, this looks as though it may have been broken by workers/31159 which was intended to speed up access to remote repositories. It's attempting to use a/b/c as a prefix, when what's needed for partial-path completion (which is not quite the same as approximate completion) is to actually fetch all the files, even if from a remote repository, so they can be tested against the partial paths. Yes, this is going to be really slow if the remote repo is large, but it is required for partial paths (unless 'git ls-files' is going to pick up the ability to do it). 31159 got first overlooked and then hastily pushed when it was pointed out that it had been overlooked. It should have gotten a bit more testing ... Probably what we need here is either a zstyle to let the user choose whether path completion works, or to simply attempt ls-files a second time without the prefix if the first attempt doesn't give any results. I'm not going to try to guess which of those is better as I'm not that familiar with git behavior, particularly on large repos.