Closed carlos-zamora closed 6 months ago
Learn Build status updates of commit a057517:
File | Status | Preview URL | Details |
---|---|---|---|
TerminalDocs/command-line-arguments.md | :white_check_mark:Succeeded | View |
For more details, please refer to the build report.
For any questions, please:
Learn Build status updates of commit e4e55bc:
File | Status | Preview URL | Details |
---|---|---|---|
TerminalDocs/command-line-arguments.md | :white_check_mark:Succeeded | View |
For more details, please refer to the build report.
For any questions, please:
Thanks for tackling this, but the update doesn't address the gist of #763, which wasn't about how to prevent PowerShell from interpreting a ;
meant to be interpreted by wt.exe
, but the inverse:
How to prevent wt.exe
from interpreting a ;
meant for a different program - such as the PowerShell CLI - for which a command line is being passed.
Such ;
characters must be escaped as \;
, irrespective of what program is being invoked and - that's the surprising part - this escaping is even necessary for ;
characters inside "..."
-enclosed arguments.
E.g.:
# From PowerShell or cmd.exe
wt.exe powershell -NoExit -Command "Get-Date\; 1 + 2"
Note how ;
must be escaped as \;
in order for wt.exe
to pass it through to powershell.exe
, despite being inside a double-quoted string.
From PowerShell's perspective, ;
does not require escaping inside "..."
or '...'
.
There were already a few of these notes in the page, so I just went ahead and added them to any other PowerShell examples that use a semicolon.
Closes #763