A while back I reworked the way that backticks are handled to make backticks in aliases work, but I made two bad assumptions and broke the handling for parsed commands. The bad assumptions were:
- There was testing for backticks in regular commands (turns out the extant tests were all for raw commands)
- That the extant function that was supposed to handle backtick options did the thing you do with backtick options
2 is me not reading closely enough. The function called was m_interpreter.ProcessEmbeddedScriptCommands so I really should have seen this wasn't doing the right thing. Apparently at some point we were going to add the ability to invoke a script command and insert its text in place of the option. That's not a bad idea, but it was never actually implemented, and anyway, you can't use backticks as the demarcation - that's already taken for expression substitution.
This patch repairs that breakage, and adds some more tests for backticks in raw commands, in the arguments of parsed commands and in the option values for parsed commands.
You could avoid a level of indentation and a continue if you invert the condition.