autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

[git] remote branches should not insert with `remote/`

Open clo4 opened this issue 3 years ago • 2 comments

Sanity checks

  • [X] My issue relates to a specific CLI completion spec (e.g. git checkout is missing options in git completion 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.

clo4 avatar Feb 23 '22 01:02 clo4

FWIW, I think fig should keep suggesting both remotes/{remote}/{branch} as well as {branch} but prioritising the latter

tpluscode avatar May 13 '22 07:05 tpluscode

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!

clo4 avatar May 16 '22 06:05 clo4