Closed viocha closed 5 months ago
Thanks for reporting! Without WSL (e.g. on Linux or macOS), the snippet is executed properly:
/usr/bin/bash -c "echo \"abc\"
bash -c 'echo 123'" /usr/bin/bash
There's probably some double-escaping by the WSL integration, I'll see what's possible to fix this.
I'll fix this for the next update.
There are a few more problems in regard to escaping of snippets, e.g. $VAR
needs to be escaped, but only if it's outside a single escaped string. For WSL, there's an extra level of escaping because the first evaluation happens by wsl.exe and not Bash. I'll have to carefully review all cases and hope to have a complete and reliable fix for the next update.
@viocha I've published a fixed version on the eap channel: https://plugins.jetbrains.com/plugin/13841-bashsupport-pro/edit/versions/eap/565897 Do you mind to install this version and confirm if it's working as expected? In general, the new version should work better on Windows. But because of the changes I'm looking for testers...
4.2.1 is public now and ships the fix.
When running the following bash snipppet from markdown file
It generates the run commmand as
And the running fails with errors
There is no need to escape single quote in double quoted string. If the generated run command is
It can run successfully.