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

Bug in bash completion for git rebase --onto

From
Paul Jolly <paul@myitcv.io>
Date
Nov 11, 2019, 19:51 UTC
Message-ID
<CACoUkn6D0cUmN1RbcpfERcOJsbGLdwj6oDeF2oRADV+rX2artQ@mail.gmail.com>
Hi,

The bash completion for git rebase --onto seems to have been broken by commit 2b9bd488ae09dc89f02be7d73f3710ee2ea7325c

Previously (v2.23.0), hitting tab after
    git rebase --on
gives:
    git rebase --onto

(note trailing space) hitting tab again offers a list of potential refs onto which to rebase.

As of 2b9bd488ae09dc89f02be7d73f3710ee2ea7325c, hitting tab after:
    git rebase --on
gives:
    git rebase --onto=

but then hitting tab again offers the current directory contents as candidates, i.e. not git ref candidates as they should be.

Note the adding of a trailing '=' is, I think, more correct/robust than the trailing space so I don't disagree with that change. It's just the failure to offer git ref candidates that is the problem.

Thanks,
Paul
Next: Denton Liu
Message 1 of 5 in “Bug in bash completion for git rebase --onto”
  1. Paul JollyNov 11, 2019
  2. completion: learn to complete `git rebase --onto=`Denton Liu, Nov 11, 2019
  3. Junio C HamanoNov 12, 2019
  4. Denton LiuNov 12, 2019
  5. Junio C HamanoNov 13, 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.