Hi everyone,
I’m seeking help to improve my Archive command in Sublime Merge.
Currently, I’ve created a command that archives using the commit hash as the filename, added to Commit.sublime-menu
:
{
"caption": "Archive ${short_commit}",
"command": "git",
"args": {
"argv": ["archive", "--format", "zip", "--output", "${short_commit}.zip", "${short_commit}"]
}
}
Although this command works, I’m looking for a way to use the branch name instead of the commit hash as the filename.
After reviewing the Sublime Merge documentation https://www.sublimemerge.com/docs/menus, it appears the available context in the menu is limited to $commit
and $short_commit
. However, I’ve noticed other commands displaying branch names in the same menu.
Could someone kindly guide me on how to extract and use the branch name as the filename in the Archive command?
Thank you for your assistance in advance!