-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve file://
hyperlinks support - local/remote hostname
#14116
Comments
As a bonus point, if Windows Terminal could also strip the fragment The Windows shell cannot handle those, but other terminals may use them for opening a text file at a given line for instance (e.g. kitty will interpret a See the drama in BurntSushi/ripgrep#2322 if you want more context. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I didn't intend to let this one marinate for so long. After reading it initially, I let it grow into this huge and concerning feature request... but it really isn't that. This is in line with the work we need to do to polish up hyperlinks in #8849. I'll keep it separate for now, but it's along the path we'll need to take to differentiate what we (1) detect and (2) launch and make those configurable. |
The hyperlinks produced by eza (with |
Description of the new feature/enhancement
Currently, Windows Terminal supports the following
file://
URI patterns:file:///C:/SomeDir/SomeFile.txt
file://localhost/C:/SomeDir/SomeFile.txt
The following patterns are rejected with a "This link type is currently not supported" message:
file://wsl$/Ubuntu/SomeDir/SomeFile.txt
file://remote_host/SomeDir/SomeFile.txt
file://local_hostname/SomeDir/SomeFile.txt
Please add support for these cases. Note that the hyperlinks (OSC 8) spec requests for the hostname to be present in file URIs.
Proposed technical implementation details
The following justification is provided in the code:
terminal/src/cascadia/TerminalApp/TerminalPage.cpp
Lines 2304 to 2309 in 54dc2c4
After testing with
ShellExecuteEx
(more precisely withProcess.Start
withUseShellExecute
in .NET), I noticed the following:wsl$
) are supported just fine by the shellTherefore, I think the Windows Terminal should:
localhost
if it happens to match the local hostnameThis relates to #7699 and #5001.
See also the discussion in BurntSushi/ripgrep#665 for the problems this feature would solve.
Another example of a really useful usage this would enable would be oh-my-posh WSL links:
The text was updated successfully, but these errors were encountered: