Sublime Forum

Custom commands with template input

#1

Hi,

I’m trying to create a custom command to be accessible through the command palette in Sublime Merge.
I’m doing this by editing A .sublime-commands file in my user folder.
This script has one mistake in “args” field “Prefix/$select_branch”, it’s what I want to do.

[
    {
    "caption": "Interactive rebase onto sub branch",
    "command": "git",
    "args": {"argv": ["rebase", "-i", "Prefix/$select_branch"]}
    }
]

How do I make such a command accept an additional variable input from the palette with some template? When I need to execute custom command I want to have some “prefix” that will be shown in user input, so every time when I need to do something with branches that have some prefix in their names, I don’t need to write this prefix in input, because it will be already there.

Thanks

1 Like