Skip to content

Make quote escaping posix compliant #69

Open

Description

@harendra-kumar

We need to make it conformant with the shell:

When inside a single quote, \ should be just like any other char, it does not escape a single quote or double quote or itself.

$ echo 'hello\\"world'
hello\\"world

When in double quote it escapes a double quote and itself only.

$ echo "hello\"\\w\'orld"
hello"\w\'orld

Activity

  1. adithyaov commented on Apr 27, 2023

    @adithyaov
    Member
    $ echo 'hello\'
    hello\
    

    See composewell/streamly#2397

  2. changed the title [-]Fix escape processing inside single and double quotes[/-] [+]Make quote escaping posix compliant[/+] on Apr 27, 2023
  3. adithyaov commented on Apr 27, 2023

    @adithyaov
    Member

    Uncomment the failing test case after fixing this.

  4. added this to the 0.2.1 milestone on Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions