file:// links with WSL$ are not supported #13905

Open
opened 2026-01-31 03:55:24 +00:00 by claunia · 0 comments
Owner

Originally created by @heaths on GitHub (May 25, 2021).

Windows Terminal version (or Windows build number)

1.8.1444.0

Other Software

No response

Steps to reproduce

In PowerShell running in WSL2, write a string like following:

"`e]8;;file://wsl$/${env:WSL_DISTRO_NAME}$PWD`e\$PWD`e]8;;`e\"

I do this in my $profile and while it renders and is recognized correctly, WT shows an error dialog it's not supported.

Expected Behavior

file:// links - Windows and WSL2 alike - open in Explorer when clicked.

Actual Behavior

Error dialog that the URL is not supported:

image

This same string e.g., file://wsl$/Ubuntu-18.04/home/heaths, I can copy from the error dialog (nice allowing us to copy the error, BTW!), paste into the Run dialog, and open it in Explorer.

The string also matches your regex and is automatically detected as a link, so the error must be coming from further in the code path. file://$PWD for a plain Windows directory e.g., file://C:\Users\heaths open in Explorer when Ctrl+Click'd just fine.

Originally created by @heaths on GitHub (May 25, 2021). ### Windows Terminal version (or Windows build number) 1.8.1444.0 ### Other Software _No response_ ### Steps to reproduce In PowerShell running in WSL2, write a string like following: ```powershell "`e]8;;file://wsl$/${env:WSL_DISTRO_NAME}$PWD`e\$PWD`e]8;;`e\" ``` I do this in [my $profile](https://github.com/heaths/profile/blob/5a187dfbc6d34a1bb7b4533e775fc9812c20fc54/Microsoft.PowerShell_profile.ps1#L176) and while it renders and is recognized correctly, WT shows an error dialog it's not supported. ### Expected Behavior `file://` links - Windows and WSL2 alike - open in Explorer when clicked. ### Actual Behavior Error dialog that the URL is not supported: ![image](https://user-images.githubusercontent.com/1532486/119577397-6d6fe000-bd6f-11eb-8d2a-fa677a4f69b9.png) This same string e.g., `file://wsl$/Ubuntu-18.04/home/heaths`, I can copy from the error dialog (nice allowing us to copy the error, BTW!), paste into the Run dialog, and open it in Explorer. The string also matches your [regex](https://github.com/microsoft/terminal/blob/7a41be5cd4f10e4780276ca528883ceac0f5c4a2/src/cascadia/TerminalCore/Terminal.hpp#L20) and is automatically detected as a link, so the error must be coming from further in the code path. `file://$PWD` for a plain Windows directory e.g., `file://C:\Users\heaths` open in Explorer when Ctrl+Click'd just fine.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13905