prezto icon indicating copy to clipboard operation
prezto copied to clipboard

[Question] autocomplete only branches when git checkout

Open kud opened this issue 5 years ago • 1 comments

Hey, when I type $ git co <tab>, I'd like to have only branches, not tags. Is there a way to do that?

Because:

image

is annoying.

Thank you!

kud avatar Nov 08 '19 13:11 kud

I have custom shortcuts to autocomplete various git entties like tags, branches, hashes using fzf which I invoke using a keybinding of <C-k>h.

The code for the same is here: https://github.com/srijanshetty/cli-goodies/blob/master/settings/101-fzf.zsh and depends on fzf.

This isn't an exact answer for your question, but I believe that using contextual keybindings in git is much better than using generic autocomplete.

srijanshetty avatar Dec 06 '19 09:12 srijanshetty