Skip to content

Escaping numbered placeholders like {:number:} (e.g. {1}, {2}) is not possible without printf workaround. #71

@Jobanny-Friki

Description

@Jobanny-Friki

I'm running into an issue with escaping numbered placeholders in rush. The docs mention you can escape {} with {{}} which works great, but what about when you need literal text like {35}?

I tried using {{35}} expecting it to output {35}, but it doesn't work - seems like it's still trying to parse it as a numbered placeholder or something. Right now I'm having to do weird stuff like $(printf \{35\}) just to get a literal {35} in my command, which feels cumbersome, i.e. not elegant.

Would it be possible to make the escaping work consistently? Like {{1}} -> {1}, {{2}} -> {2}, etc? It would make sense to follow the same pattern as the empty braces.

Not sure if this is a bug or missing feature, but it would definitely make life easier when working with commands that need literal curly brace notation with numbers in them, as could be the use of extended regular expressions or PCRE2 as either commands like sed, grep or awk.

⮞ PCRE2 Syntax - Quantifiers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions