-
Notifications
You must be signed in to change notification settings - Fork 187
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
Clickable named report url in terminal #1394
Comments
I did something like this for FluentAssertions's build process: https://github.com/fluentassertions/fluentassertions/blob/develop/Build/Build.cs#L171 Is that what you are looking for? |
I think that is the same yes, however I'm worried about
I don't know if that's an actual problem. If terminals that don't support this simply drop the unrecognizable ansi then that's fine to me. If they don't then we will need some way of keeping track of which terminal supports this and only print the characters in those consoles. Preferably we would not maintain a list of supported terminals in stryker but so far I have not found a package for this. |
I think I remember CMD just ignored the ANSI hyperlink part. However, in GitHub actions is just doesn't show anything: https://github.com/fluentassertions/fluentassertions/runs/5270152443?check_suite_focus=true#step:4:285 |
Maybe with Spectre? spectreconsole/spectre.console#160 |
That's cool! |
Is your feature request related to a problem? Please describe.
Our report urls are fully qualified. Some terminals support named urls. It might also be good to add a file protocol to the existing url's so it's easier to detect the local filepath as an url by terminals that already support this.
This is different from #1395 in that the URI's would no longer need to be prefixed by
file://
as we would prefix them with invisible ANSI characters that provide the same hint to supported terminals.Describe the solution you'd like
Apparently there is ansi support for clickable named links. Some terminals implement this and in those terminals we could use this. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
Additional context
We do not want to print the named url stuff on terminals that do not support this as the characters might simply be printed to the console which makes it hard for users to open the file links.
I could find javascript libraries for this but no csharp library. We could create our own library (and publish it?) based on for example https://github.com/sindresorhus/terminal-link/blob/main/index.js
Support for clickable links is added to the new windows terminal which means our largest user base will at some point have this feature available to them: microsoft/terminal#204
The text was updated successfully, but these errors were encountered: