[PR #12102] Fix //wsl$ paths not working in MangleStartingDirectoryForWSL #28853

Closed
opened 2026-01-31 09:31:12 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/12102

State: closed
Merged: Yes


This PR does two things, which are best viewed as atomic commits:

  • e64ae7d: Move the MangleStartingDirectoryForWSL to types/utils. It doesn't really make sense in types, since it's only really being used in a single place in TerminalConnection. However, TerminalConnection doesn't have tests, and types does. So this commit move the function there, and adds tests from #9223 to the types tests.
  • 42036c5: This actually fixes the bug in #11994. Unfortunately, wsl --cd will try to treat paths starting with //wsl$ as a linux-relative path, when the user almost certainly wanted a windows-relative one. So we'll mangle that back into a path that looks like \\wsl$\foo\bar.
  • closes The way Settings works sucks! You should give us a a menu to select color and opacity settings! (#11994)
  • I work here
  • tests added 🎉
**Original Pull Request:** https://github.com/microsoft/terminal/pull/12102 **State:** closed **Merged:** Yes --- This PR does two things, which are best viewed as atomic commits: * e64ae7d: Move the `MangleStartingDirectoryForWSL` to `types/utils`. It doesn't _really_ make sense in `types`, since it's only really being used in a single place in TerminalConnection. However, TerminalConnection doesn't have tests, and types does. So this commit move the function there, and adds tests from #9223 to the types tests. * 42036c5: This actually fixes the bug in #11994. Unfortunately, `wsl --cd` will try to treat paths starting with `//wsl$` as a linux-relative path, when the user almost certainly wanted a windows-relative one. So we'll mangle that back into a path that looks like `\\wsl$\foo\bar`. * [x] closes #11994 * [x] I work here * [x] tests added 🎉
claunia added the pull-request label 2026-01-31 09:31:12 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28853