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

Shell completion for branch names

From
Jjost.schulte@tutanota.com <jost.schulte@tutanota.com>
Date
Apr 7, 2021, 14:23 UTC
Message-ID
<MXghkzC----2@tutanota.com>
Hello guys,
I have a question regarding git-completion. I'm using zsh and have added the function .git-completion.bash. That gives me some auto-completion for branch names.
What I'm looking for: I have a branch named "feature/issue-123-add-feature" for example. I'd like to type "git switch 123[tab]". Is there some function out there that provides this?

Cheers Jost

Next: Junio C Hamano
Message 1 of 3 in “Shell completion for branch names”
  1. jost.schulte@tutanota.comApr 7, 2021
  2. Junio C HamanoApr 7, 2021
  3. Jeff KingApr 7, 2021

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.