Skip to content

Support for ansi like escape sequences #19

@Disservin

Description

@Disservin

Provided a string like echo $'hola\n' the library will parse this as

[0 => "echo", 1 => "$hola\n"]

while for example sh,bash,zsh will give the following argv to a c(++) program

sh-3.2$ clang++ test.cpp && ./a.out echo $'hola\n'
'./a.out'
'echo'
'hola
'

So the $ sign is completely gone, this is used for ansi c like escape sequences
https://unix.stackexchange.com/questions/115612/understanding-two-flags-and-a-dollar-sign-in-a-curl-command

without it there is no newline

sh-3.2$ clang++ test.cpp && ./a.out echo 'hola\n'
'./a.out'
'echo'
'hola\n'

I would hope for the library to be able to just return something like
[0 => "echo", 1 => "hola\n"]

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