In Sublimetext editor, we can specify custom build command using shell_cmd exec Target Options.
I want to add a subcommand within shell_cmd value. For Linux terminal commands, this can be done as outer-bin arg1 $(inner-command), where $(inner-command) provides the second argument for the outer-bin command.
I edit and run Tamarin models with Sublimetext. Some model files (e.g. LAK06-UK3.spthy) contain user-defined lemma (e.g. executable) and some implicit lemmas (e.g. Observational_equivalence). The default Tamarin command with --prove flag proves all user-defined and implicit lemmas. However, with the subcommand in the build system, I wish to pass only user-defined lemma. The build command including the subcommand for the LAK06-UK3.spthy could be:
tamarin-prover --diff LAK06-UK3.spthy $(python3 extract_lemma_cmd.py LAK06-UK3.spthy)
which translates to
tamarin-prover --diff LAK06-UK3.spthy --prove=executable
Any idea, how can I do this for Sublimetext custom build command?
You can use
$()for command substitution, you just need to escape the$:Make sure you use a double backslash
\\$for the escape.Another solution is to use backticks:
Please note that these
shell_cmds will only work as-is on Linux and Mac. For Windows, they need to be run usingbash -c, as the default shell on Windows iscmd.exe.