Hey, guys.
Can someone please give me a clue, if Sublime Merge allows to make a custom selector (say, $branch_at_commit) which could be used in a custom command like this:
{
"keys": ["ctrl+n"],
"command": "show_command_palette",
"args":
{
"command": "rename_branch",
"args": { "prompt": true, "branch": "$branch_at_commit" }
}
}
, where $branch_at_commit is the result of something like:
git branch --points-at $commit | sed ‘/HEAD/d’ | head -n1
My current variant is ok, but it targets strictly the branch we’re currently at:
{
"keys": ["ctrl+n"],
"command": "show_command_palette",
"args":
{
"command": "rename_branch",
"args": { "prompt": true, "branch": "$head" }
}
}
, … I wish it could be more versatile, allowing to target any selected branch.
So yeah, the question is whether I can make a custom selector in Sublime Merge. Or maybe there is a neat workaround for that.
Thank you.