prezto
prezto copied to clipboard
[Question] autocomplete only branches when git checkout
Hey, when I type $ git co <tab>
, I'd like to have only branches, not tags. Is there a way to do that?
Because:
is annoying.
Thank you!
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.