mate-desktop / mate-terminal

The MATE Terminal Emulator
http://www.mate-desktop.org
GNU General Public License v3.0
135 stars 73 forks source link

Add support for OSC 8 hyperlinks (HTML-like anchors) #427

Closed geo-stark closed 10 months ago

cwendling commented 1 year ago

See also #175

geo-stark commented 1 year ago

See also #175 My patches are just backported from gnome made by the author of the comment #175

lukefromdc commented 1 year ago

I have no idea how to test this, would need to be able to do so without connection to unknown/unsafe sites

geo-stark commented 1 year ago

I have no idea how to test this, would need to be able to do so without connection to unknown/unsafe sites

Overall information about this feature: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda some quick tests: 1) printf '\e]8;;https://ubuntu.com/\e\\Ubuntu 21.10\e]8;;\e\\n' 2) ls --hyperlink=always

lukefromdc commented 1 year ago

I don't really understand this, so will leave it for other team members to work on. I DO see a possible issue in your linked explanation though: autocompleting URLs could lead people to sites they don't ever want to connect to (e.g Facebook, Tiktok) or even to malware sites. Anything networked requires serious security, and coding it is out of my experience beyond blocking such sites on my machines.

zhuyaliang commented 1 year ago

@geo-stark Thank you for your work. I am very interested in this new function. I will review the code when I have enough time

vkareh commented 1 year ago

@lukefromdc

I don't really understand this, so will leave it for other team members to work on. I DO see a possible issue in your linked explanation though: autocompleting URLs could lead people to sites they don't ever want to connect to (e.g Facebook, Tiktok) or even to malware sites. Anything networked requires serious security, and coding it is out of my experience beyond blocking such sites on my machines.

This just affects rendering. What this does is expose functionality already available in VTE: hypertext linking. We already do the same thing with plain links, this just adds the hypertext portion.

Screenshot at 2023-03-08 12-24-55

Screenshot at 2023-03-08 12-25-14

Screenshot at 2023-03-08 12-25-27

raveit65 commented 10 months ago

@vkareh @geo-stark What is the status of this?

vkareh commented 10 months ago

This looks good to me. I just did a quick review of the code and tested it and it still works as I remember. I'm fine if we merge this.

raveit65 commented 10 months ago

@vkareh Any chance to approve it :)

geo-stark commented 10 months ago

@vkareh @geo-stark What is the status of this?

I responded to all comments regarding the patches. If community has other questions \ suggestions I'm ready to answer it.

raveit65 commented 10 months ago

I have no idea how to test this, would need to be able to do so without connection to unknown/unsafe sites

Overall information about this feature: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda some quick tests:

1. printf '\e]8;;[https://ubuntu.com/\e\\Ubuntu](https://ubuntu.com/%5Ce%5C%5CUbuntu) 21.10\e]8;;\e\\n'

2. ls --hyperlink=always

A better page for information seems to be here https://github.com/Alhadis/OSC8-Adoption