[PATCH 2 of 2 RFC] completion: use debugpathcomplete in bash_completion

Bryan O'Sullivan bos at serpentine.com
Wed Mar 13 17:00:10 CDT 2013


On Wed, Mar 13, 2013 at 2:42 PM, Bryan O'Sullivan <bos at serpentine.com>wrote:

> There is a tradeoff, however: since we don't check the status of
> files, we can now produce *more* completions than necessary for
> cases where we'd like to complete only with modified files (e.g.
> commit, diff). I'm not sure this is the right tradeoff, but it
> seems much better than being terribly slow.
>

To expand on this:

Suppose you want to commit a changed file from the root of your repo, so
you type "hg commit m<TAB>".

Old behaviour: all modified names under the working directory or its
children that begin with "m" will be completed, even if they're several
levels deep in the hierarchy.

Changed behaviour: all tracked names *only* under the current directory
that begin with "m" will be completed, even if they are files that are not
modified, or directories that contain files that are not modified. You
might have to hit tab a few times to get down several levels deep.

I am not thrilled by this, even though it's basically harmless. On the
other hand, it matches how the shell normally behaves, and the old
behaviour of actually running status is crazytown unacceptably slow in even
a moderately large repo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130313/4c861092/attachment.html>


More information about the Mercurial-devel mailing list