-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Description
Windows Terminal version
1.20.11781.0
Windows build number
10.0.26100.0
Other Software
Ubuntu 24.04 (in WSL and source
of Windows.Terminal.Wsl
in the profile; any WSL distributions are affected)
Steps to reproduce
- Open a WSL tab.
- Drag and drop a file/folder (the full path needs at least one single quote
'
character), sayD:\John's Archive
.
Expected Behavior
When
D:\John's Archive
is dropped to a WSL tab, a string which expands to:
/mnt/d/John's Archive
(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 after s
is not quoted and will not be preserved.