1

Is there a way to make the shell autocomplete git branch names like it does in linux(mint). While typing, for example,

git push -u origin so<tab>

in linux, this will give me all the branches that start with “so”. Is there a way to get this behavior with the shell (on OS X)?

1
  • 1
    This is similar to superuser.com/q/53992/81175, except that that’s about autocompleting git subcommands. That was flagged as a duplicate of superuser.com/q/288438/81175, which is generically about customizing autocompletion in Bash, which might indirectly help you find a solution, but doesn’t directly answer your question about git branch name autocompletion.
    – Chris Page
    Dec 30, 2015 at 12:08

1 Answer 1

2

The best results possible currently will be found by installing fish: https://fishshell.com

It comes with very snazzy Git completions that work out of the box and targets OS X as a first class platform. I'd suggest installing through homebrew if you have it - otherwise download the pkg installer. You'll probably have it up and running in less time than it'd take to get the disappointing bash completions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .