Feature Description
Let the Script Runner pick the interpreter from a script's shebang instead of always running it through bash.
Problem Statement
Right now scripts run via executeBashScript, so anything that isn't bash (a .fish or .py script) doesn't really work even if that's what I want to write in.
Proposed Solution
When a script is run, write it to a temp file, mark it executable, and exec it directly so #!/usr/bin/env fish (or python, ruby, etc.) decides the interpreter. That covers everything in one go rather than special-casing each shell.
Use Cases
- Keep a Sol command in fish so it can share my existing fish functions.
- Drop in a quick
.py script without rewriting it in bash.
- Reuse an existing script as-is regardless of what it's written in.
Alternatives Considered
A .sh wrapper that execs the real script works today, but it's an extra file per command.
Additional Context
The commented-out extension list in scripts.store.tsx already hints at this direction, so it might be on your radar.
Impact
Makes the Script Runner usable with whatever I already write in, instead of porting things to bash.
Priority
Low
Feature Description
Let the Script Runner pick the interpreter from a script's shebang instead of always running it through bash.
Problem Statement
Right now scripts run via
executeBashScript, so anything that isn't bash (a.fishor.pyscript) doesn't really work even if that's what I want to write in.Proposed Solution
When a script is run, write it to a temp file, mark it executable, and exec it directly so
#!/usr/bin/env fish(or python, ruby, etc.) decides the interpreter. That covers everything in one go rather than special-casing each shell.Use Cases
.pyscript without rewriting it in bash.Alternatives Considered
A
.shwrapper that execs the real script works today, but it's an extra file per command.Additional Context
The commented-out extension list in
scripts.store.tsxalready hints at this direction, so it might be on your radar.Impact
Makes the Script Runner usable with whatever I already write in, instead of porting things to bash.
Priority
Low