I read the Grok output, thank you. I also know about the plug-in. I have been experimenting with "tools" instead.
The shellcheck plug-in uses Python, but I was looking for straight execution. Apparently "tools" route their OS calls through Python. I thought they were going through straight compiled Pascal code to the OS, just as compiled C code would work.
My tools all use shell=false, but effectively do the same thing as shell=true. They call /usr/bin/bash as command, and "-c ....whatever..." as parameter. I have never seen any of my tools work correctly when shell=true.
I probably do not understand the intent behind tools or the mechanisms involved. I'm glad to have the shellcheck plug-in, but just wanted to try it as a tool, which I guessed should be simpler than the plug-in Python code. After all, it's just an OS call against the open file window. So my learning could apply to any number of other OS calls.
For example, I just made a "tool" that strips blank lines from the current selection. It leaves the shell checkbox unchecked, but invokes /usr/bin/bash explicitly with this param string:
Code: Select all
-c '/usr/bin/strings --all --unicode=default --encoding=S --bytes=1 <(echo -n -E "{SelectedText}")'
and "Replace selection" as the tool output choice.
Is there a way to rewrite this blank line removal tool with the checkbox checked? Which way is more correct for this tool, or shellcheck, or any other text utility? According to Grok, redirection usage means it should have the shell box checked. How would you rewrite it? Or would you? Thanks.