I’m trying to use selectors in a custom command to push a renamed remote ref from my local branch. Something like this:
"caption": "Push Renamed",
"command": "git",
"args": {
"argv": ["push", "origin", "$head:$text"],
"prompt": true,
}
However, this doesn’t work and tries to run git push origin <head>:
. I want it to prompt the user for text to name the remote branch and then run the command with that text, like git push origin <head>:<user-text>
.
It seems like selectors are only observed if they’re the only value for an argument. Since Git’s push subcommand doesn’t support accepting a destination except as part of the ref argument, it seems like there might be no way to do this unless Sublime Merge interpolated selectors into strings.