Skip to content

Escaping with cmd on Windows #3616

Description

@starfishpatkhoo

Is there something wonky with escaping with cmd shell on Windows? Like escaping ", or \ ? Feels kind of off to me?

Version: 1.56

C:\> echo My test is "awesome"
My test is "awesome"

C:\>  echo My test is \"awesome\"
My test is \"awesome\"
test:
  echo My test is "awesome"
  echo 'My test is "awesome"'
  echo My test is ""awesome""
  echo My test is '"'awesome'"'
  echo My test is '""'awesome'""'
  echo My test is \"awesome\"
C:\> just test
[11:43:21] echo My test is "awesome"
My test is \"awesome\"
[11:43:21] echo 'My test is "awesome"'
'My test is \"awesome\"'
[11:43:22] echo My test is ""awesome""
My test is \"\"awesome\"\"
[11:43:22] echo My test is '"'awesome'"'
My test is '\"'awesome'\"'
[11:43:22] echo My test is '""'awesome'""'
My test is '\"\"'awesome'\"\"'
[11:43:22] echo My test is \"awesome\"
My test is \\\"awesome\\\"

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