From: Junio C Hamano Date: Wed, 07 Apr 2021 19:52:26 GMT Subject: Re: Shell completion for branch names Message-ID: In-Reply-To: jost.schulte@tutanota.com writes: > 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? I am not an area expert for shell completion, but as a mere user, unless the shell completion in a directory where I have README.txt file, responds to $ cat EAD and completes the request to $ cat README.txt I would find such a behaviour quite confusing. On the other hand if $ git log feat expands to $ git log feature/issue- then another after that would offer 123-add-feature and 143-fix as candidates, or instead of if I type "123" and get it expanded to the full feature/issue-123-add-feature, then I wouldn't find it confusing or unnatural.