The currently available selectors for custom commands are a bit too special-purpose and allow for selecting either a tag, a branch or a commit, but only that specifically. What I'm missing is a $select_ref selector that I can use for a command like git rebase, where I'd like to rebase onto a tag, a branch, or a commit, depending on the situation. In fact, many git commands take a "ref". Currently, I'd need to create a separate command for each variation. When creating a custom command for e.g. git rebase --onto, I want to select two refs, meaning I'd need to create 3*3 different commands and I'd need to know ahead of time what exactly it is I want to select in each position (which I generally do but I don't want to think about that when invoking this kind of operation).
Preferred solution
A $select_ref selector that allows me to select any git ref, i.e. a branch, a tag, or a commit. Branch and tag names should be prioritized over a commit's summary line (usually displayed on the right side).
Problem description
The currently available selectors for custom commands are a bit too special-purpose and allow for selecting either a tag, a branch or a commit, but only that specifically. What I'm missing is a
$select_ref
selector that I can use for a command likegit rebase
, where I'd like to rebase onto a tag, a branch, or a commit, depending on the situation. In fact, many git commands take a "ref". Currently, I'd need to create a separate command for each variation. When creating a custom command for e.g.git rebase --onto
, I want to select two refs, meaning I'd need to create 3*3 different commands and I'd need to know ahead of time what exactly it is I want to select in each position (which I generally do but I don't want to think about that when invoking this kind of operation).Preferred solution
A
$select_ref
selector that allows me to select any git ref, i.e. a branch, a tag, or a commit. Branch and tag names should be prioritized over a commit's summary line (usually displayed on the right side).Example
.sublime-command
entry:Alternatives
Create a separate command for each option combination (already possible but not desired).