autocomplete
autocomplete copied to clipboard
[git] remote branches should not insert with `remote/`
Sanity checks
- [X] My issue relates to a specific CLI completion spec (e.g.
git checkoutis missing options ingitcompletion spec). If your issue is more general, please create your issue here: withfig/fig - [X] I have searched github.com/withfig/autocomplete/issues and there are no duplicates of my issue
- [X] I would like to work on this.
What CLI tool does this relate to?
git
Which statement makes the most sense?
Something else
Issue Details
This isn't really a bug or an error, just a UX improvement - most of the time, you don't actually want to git checkout remote/<name> since that won't create a local branch to track it. It will put you in a detached HEAD state.
Should be an easy fix.
FWIW, I think fig should keep suggesting both remotes/{remote}/{branch} as well as {branch} but prioritising the latter
FWIW, I think fig should keep suggesting both remotes/{remote}/{branch} as well as {branch} but prioritising the latter
Will definitely keep this in mind. We can check for suggestions that start with remote/, create another suggestion with that trimmed off, then give the trimmed suggestion a higher priority!