thoughtbot / gitsh

An interactive shell for git
https://thoughtbot.com
BSD 3-Clause "New" or "Revised" License
1.95k stars 105 forks source link

Add a $branch variable to tab completion #353

Closed georgebrock closed 5 years ago

georgebrock commented 5 years ago

Fixes #352

The tab completion DSL had a $revision variable which produces branch names, tag names, etc. In some contexts it's too general, e.g. branch -D accepts a branch name but not a tag. In those contexts we were using $anything to avoid producing invalid tab completion options.

This PR introduces a more specific $branch variable that can be used when we want to only tab complete branch names.

georgebrock commented 5 years ago

Checks off one of the items on #314