Open emersonjds opened 7 months ago
+ within code comments too
Hey @emersonjds, just wanted to mention that the ability to cmd-click
urls in editors landed in this week's preview and will be shipping to stable next Wednesday.
We have this issue here for tracking clickable links in popovers:
I think that only leaves us with needing an issue for clickable hyperlinks in the terminal. Let's use this issue for that.
@JosephTLyons This is great, I'm following each evolution of the project and I admire many platforms that work for the developer experience, thank you for your work and team #goZED
Opening links with Cmd+Click is already implemented: https://github.com/zed-industries/zed/assets/19362696/baf81be8-455a-4b54-94ab-94627807cbd2
Is there perhaps a bug? Seem like in the How it works today
example the feature just doesn't work.
Very welcome improvement!
One quirk I noticed almost immediately is that the URL pattern-matcher doesn't seem to recognize URLs with query string parameters.
$ # this is cmd-clickable
$ echo https://google.com
https://google.com
$ # this is NOT cmd-clickable
$ echo https://google.com\?q\=zed+editor
https://google.com?q=zed+editor
Here's the regex (copied from Alacritty code originally): https://github.com/zed-industries/zed/blob/7956a9a547949cf826d3e30f46c12a7edef67316/crates/terminal/src/terminal.rs#L382
and this is how we use it to match things: https://github.com/zed-industries/zed/blob/7956a9a547949cf826d3e30f46c12a7edef67316/crates/terminal/src/terminal.rs#L794
It would be great to write tests for those matches, but not sure it's as easy as just fixing the regex.
Opening links with Cmd+Click is already implemented: https://github.com/zed-industries/zed/assets/19362696/baf81be8-455a-4b54-94ab-94627807cbd2
Is there perhaps a bug? Seem like in the
How it works today
example the feature just doesn't work.
The idea is that if you click on any link within a file or in a README.md, the editor understands that it should open this link in a browser, not just links provided by the integrated terminal
Cmd + Clicking links in the terminal (with query params) does not work for me
Possibly related, when editor panel is active, Cmd+Clicking in terminal is not working, instead a click will focus the terminal panel. Releasing and pressing Cmd again will work as intended. Perhaps this is the cause for remaining problems:
Can confirm that this doesn't work if there are query parameters, which happens e.g. for all GitLab Merge Request links. MWE:
# this works
echo https://google.com
# this doesn't
echo https://google.com/search?country=de
Check for existing issues
Describe the feature
During development, it is normal to have a link to run the project where we click to see the execution in the browser, either in readme.MD or in the terminal itself when it generates a link to follow the development.
What happens is that there is no such feature, I believe that implementing it would greatly help the developer's experience
If applicable, add mockups / screenshots to help present your vision of the feature
How it works today
https://github.com/zed-industries/zed/assets/12503997/ec7eb97a-cce3-427e-af17-aa1da103bff4
How it should work
https://github.com/zed-industries/zed/assets/12503997/cf3fb2e8-37f9-4584-b522-3ab0ecb31f54