git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bug: subcommand autocomplete fails on 2.21.0

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Apr 6, 2019, 21:19 UTC
Message-ID
<20190406211958.GE8796@szeder.dev>
In-Reply-To
<20190406174929.GD8796@szeder.dev>
On Sat, Apr 06, 2019 at 07:49:29PM +0200, SZEDER Gábor wrote:
Show 29 quoted lines
> On Sat, Apr 06, 2019 at 12:36:30PM -0400, Paul Schreiber wrote:
> > With git 2.21.0, tab completion no longer works for subcommands.
> > 
> > STEPS TO REPRODUCE
> > 1. install git 2.21.0 from https://git-scm.com/download/mac
> > 2. source /usr/local/etc/bash_completion.d/git-extras (manually, or update your .bashrc/.profile and start a new terminal)
> > 2. git clone https://github.com/tj/git-extras
> > 3. cd git-extras
> > 4. sudo make install
> 
> By the looks of it, this installs five commands whose names start with
> 'del':
> 
>   git-delete-branch
>   git-delete-merged-branches
>   git-delete-submodule
>   git-delete-tag
>   git-delta
> 
> If this is indeed the case, then ...
> 
> > 5. change directory to a git repository
> > 6. type "git del” and press [tab] 
> > 
> > EXPECTED
> > line is changed to "git delete-merged-branches"
> 
> ... this behavior would, in fact, be a bug, because 'del' is the
> unique prefix of those five commands.
Erm, let me rephrase, because this doesn't make sense:

... this behavior would, in fact, be a bug, because 'del' is the common prefix of those five commands, so it can't be uniquely completed.

Show 14 quoted lines
> > ACTUAL
> > [beep]
> 
> And I think this is the right behavior, and on a second TAB it should
> list all commands whose name starts with 'del'.
> 
> > CONFIG
> > macOS 10.13.6 (17G5019) and macOS 10.14 (18E226)
> > git 2.21.0
> > git-extras 4.8.0-dev
> > 
> > REGRESSION
> > Works as expected with git 2.17.0.
> 
Previous: SZEDER Gábor
Message 3 of 3 in “Bug: subcommand autocomplete fails on 2.21.0”
  1. Paul SchreiberApr 6, 2019
  2. SZEDER GáborApr 6, 2019
  3. SZEDER GáborApr 6, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.