Skip to content

preventing -c argument with custom interpreter #1002

@stessaris

Description

@stessaris

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions