Execute system commands via hotkeys or command palette in Obsidian (https://obsidian.md). Some automated events are also supported, and execution via URI links.
I noticed that also isShellSupported() needs changes, too. The function has currently a bug that allowed sh to pass as shell because it matched with the end letters of bash. I do want to accept sh, but I want to do it explicitly, not by accident 🙂. So I'm going to change the isShellSupported() function in a way that:
It will be more strict when matching shells (compare whole file name, not just end of file name).
Discussed in https://github.com/Taitava/obsidian-shellcommands/discussions/280
I should add
case "sh":
to: https://github.com/Taitava/obsidian-shellcommands/blob/2bbc0124a46852dd65bc88971078f839b80c0f85/src/variables/escapers/EscapeValue.ts#L29-L34Added 2022-11-05
I noticed that also
isShellSupported()
needs changes, too. The function has currently a bug that allowedsh
to pass as shell because it matched with the end letters ofbash
. I do want to acceptsh
, but I want to do it explicitly, not by accident 🙂. So I'm going to change theisShellSupported()
function in a way that:sh
explicitly.Here's the current, problematic form of the function: https://github.com/Taitava/obsidian-shellcommands/blob/2bbc0124a46852dd65bc88971078f839b80c0f85/src/Shell.ts#L48-L58 (The line 52 is accidentally too lenient.)