For shell blocks, the code in
|
extraArgs = append(extraArgs, "-c", script) |
adds a
-c argument to the command to be run; even for custom runners set via the
interpreter option.
Is there a way to disable this (or forcing the CommandModeTempFile mode)? For the time being I use a different language identifier, but in this way you don't get the proper syntax colouring.
The -c argument is not standard, and its inclusion prevents using potentially useful applications. My use case is with the Nix package manager, which (broadly speaking) installs software in a virtual environment similarly to Python.
E.g.:
#!/usr/bin/env nix
#! nix shell nixpkgs#bash nixpkgs#hello nixpkgs#cowsay --command bash
hello | cowsay
installs bash, hello, and cowsay packages and feeds the script to bash. Ideally, I'd use sh instead of text as language to get the proper syntax.
There are several tools that use the "shebang" trick to encapsulate dependencies in scripts, and they can be used to extend and complements the default languages supported by RUNME. E.g., among others, uv, mise-en-place, pixi.
For shell blocks, the code in
runme/runner/command.go
Line 213 in 978c12b
-cargument to the command to be run; even for custom runners set via theinterpreteroption.Is there a way to disable this (or forcing the
CommandModeTempFilemode)? For the time being I use a different language identifier, but in this way you don't get the proper syntax colouring.The
-cargument is not standard, and its inclusion prevents using potentially useful applications. My use case is with the Nix package manager, which (broadly speaking) installs software in a virtual environment similarly to Python.E.g.:
installs
bash,hello, andcowsaypackages and feeds the script tobash. Ideally, I'd useshinstead oftextas language to get the proper syntax.There are several tools that use the "shebang" trick to encapsulate dependencies in scripts, and they can be used to extend and complements the default languages supported by RUNME. E.g., among others, uv, mise-en-place, pixi.