Skip to content

Escape string interpolation #694

@hack3ric

Description

@hack3ric

Writing Bash scripts in Rhai is somewhat uncomfortable when it comes to Bash's ${VAR} syntax:

cmake .. ${cmake_args[@]}
ninja

Currently I have to write

let script = `
  cmake .. ${"${cmake_args[@]}"}
  ninja
`;

Could there be some forms of escaping this syntax, either double dollar sign ($$) similar to writing back-ticks (``), or a more general escape pattern that includes \$ (or more broadly, \`)?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions