WSL paths need further escape of single quotes #18006
Labels
Area-TerminalControl
Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)
In-PR
This issue has a related PR
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Product-Terminal
The new Windows Terminal.
Milestone
Windows Terminal version
1.20.11781.0
Windows build number
10.0.26100.0
Other Software
Ubuntu 24.04 (in WSL and
source
ofWindows.Terminal.Wsl
in the profile; any WSL distributions are affected)Steps to reproduce
'
character), sayD:\John's Archive
.Expected Behavior
When
is dropped to a WSL tab, a string which expands to:
(single argument) in the shell should be dropped.
An example satisfying this condition includes
'/mnt/d/John'"'"'s Archive'
(escaping a single quote'
with'"'"'
(finish quote, print a single quote character then begin quote again).Note: the expected behavior may differ depending on which environment we should assume.
This expected behavior here is of the POSIX shell context and I think this is reasonable.
Actual Behavior
In the dropped path, single quotes in the original full path are kept as-is (
D:\John's Archive
→'/mnt/d/John's Archive'
).This is clearly wrong in the POSIX shell context because a quoted string ends before
s
and the space afters
is not quoted and will not be preserved.The text was updated successfully, but these errors were encountered: