zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Approximate file path completion for git?
Date: Fri, 10 Jan 2014 21:34:33 -0800	[thread overview]
Message-ID: <140110213433.ZM22191@torch.brasslantern.com> (raw)
In-Reply-To: <CAHyxEs1svPL-w4BgL4YghL=nrh_Y+xymGBQD0TtbN8s6DVWg-g@mail.gmail.com>

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<TAB>
} 
} 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.


  reply	other threads:[~2014-01-11  5:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-11  4:50 Keerthan jai.c
2014-01-11  5:34 ` Bart Schaefer [this message]
2014-01-11  7:37   ` Bart Schaefer
2014-01-11 17:58     ` Bart Schaefer
2014-01-11 22:13       ` Keerthan jai.c
2014-01-11 23:41         ` Bart Schaefer

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=140110213433.ZM22191@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@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).