-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add Hyperlink function to ViritualTerminal TextFormat namespace #758
Conversation
Misspellings found, please review:
To accept these changes, run the following commands from this repository on this branch
|
2 similar comments
Misspellings found, please review:
To accept these changes, run the following commands from this repository on this branch
|
Misspellings found, please review:
To accept these changes, run the following commands from this repository on this branch
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s). |
I removed the link to #558 as I believe the spirit of that issue is that we should also use the VT support when appropriate. Let us know if you want tackle that in this PR as well so that we don't merge it before you are ready. If you don't, I'm perfectly happy to accept the assist and use it when we get the chance. |
Thanks, @JohnMcPMS. I'd be happy to break this into two PRs. This one to add the helper, and then if I get some time this weekend or over lunch or something I can look into plumbing the rest through. I should point out, WT seems to automatically make links that are emitted clickable. For instance, project page URLs in the manifest are already navigable. We could make that text explicitly a link, but this helper will be most helpful when text that is not intrinsically a link should navigate somewhere. Maybe well-known license names could point to their text? Any other scenarios that you had in mind? |
I hadn't really paid attention to Terminal making links automatically. I think that means that we do actually have all of our current uses covered (at least in Terminal), although we should probably do the right thing and output the VT sequence. We could use it to compress some of our output, such as having |
I should point out Mintty and ConEmu, the 2 other major terminals on Windows support the OSC 8 sequence and I believe a few others that ported to Windows also support it. Fundamentally we'll need to output the OSC 8 VT sequence in the case of using conhost (which doesn't automatically display hyperlinks unlike Terminal) or a terminal running on top of conhost that doesn't support the VT sequence natively. I think the general idea is that while there are Windows specific APIs for the console for compatibility purposes, new CLI applications and terminals should support using the VT sequences provided by the console or implement the support themselves (if a terminal). It's also possible that one day winget gets run under a .net5 cli on Linux or Mac to install .net applications more easily. Supporting the necessary VT sequences would become more critical at that point. |
We should probably update #558 to include this conversation, and the new understanding of the requirements. |
Adding VirtualTerminal TextFormat helper for making text a clickable link.
Microsoft Reviewers: Open in CodeFlow