3 ms·
> As of GCC 10, that option text is now a clickable hyperlink (again, assuming a sufficiently capable terminal) Seems like mostly only GNOME Terminal and iTerm
by jchw 7y ago
> As of GCC 10, that option text is now a clickable hyperlink (again, assuming a sufficiently capable terminal)
Seems like mostly only GNOME Terminal and iTerm2. Here’s some that apparently won’t work:
- Konsole
- Kitty
- LXDE Terminal
- MATE Terminal
- hyper
- Windows Terminal
- ConEmu
- PuTTY
... so it’s kind of weird to suggest this is an accepted standard. Especially since some of the discussions in feature requests suggest they will likely not implement it due to security concerns or otherwise.
- cowsandmilk 7y agoI don’t see anything suggesting it is a standard. It seems like it is an enhancement that some terminals support. It isn’t like this feature degrades support for any other terminal, just improves life for some users. Why complain?
- jchw 7y agoBecause it can break terminals that don’t. Nothing forces you to put enough context in your link to be able to recover the URL. Unsuspecting developers who only target iTerm2 will put a link in for “Click here to complete OAuth2 flow” or something and it will be broken... In this case it isn’t the worst problem ever. but i think support for this should probably be removed from terminal emulators unless a quorum of popular terminal emulators support it. (Addendum: do developers actually do things that only work in virtually a single terminal emulator? Yeah. A lot of Node.JS software printed status using emoji that broke horridly on everything but macOS. It mostly works elsewhere now, and it was purely a visual problem, but I would assume many didn’t even realize what their app would’ve done in most terminal emulators. The same with hyperlinks would be a disaster.)
- pwdisswordfish2 7y agoSomeone should create a database of various terminal emulators and the features they support, so that applications would be able to look up what features are available. We shall call it the ‘terminal capabilities library’.
- jchw 7y agoI dislike this strategy because then everyone pretends to be xterm and we’re back to square one.
- yjftsjthsd-h 7y agoYeah, it feels like we're just doing user agent vs feature detection all over again. And the xterm thing is a real concern, since I've read that lots of terminals have indeed pretended to be xterm, leading to programs having to try to detect the real terminal identity because they set TERM=xterm but don't have 100% of xterm's features...
- jchw 7y agoYep... this is exactly the problem. In fact sometimes you are recommended to go and override $TERM in order to fix a bug. Worse, is apps that do “work” but miss features. Like it is often recommended to set your term to xterm-256color to get high color in terminal apps. It’s not a huge deal, but it is simultaneously not a situation I like or think should be encouraged. FWIW I am quite confident you can do better progressive feature detection in terminals, but until that somehow gains traction we’re going to get a lot of “hey, how come i cant click the link?” and the answer is they are using KDE or Windows.
- yjftsjthsd-h 7y agoYup. I use alacritty, but if I SSH I frequently have to force TERM=xterm or something because nothing knows about that. But it's fine when I SSH from in tmux... because I have tmux force TERM=screen-256color to get better color support:)
- markrages 7y ago> We shall call it the ‘terminal capabilities library’. Naw, that's too long, call it something short and snappy like "termcap".
- saagarjha 7y agoDon’t those terminals have hyperlink detection anyways? What’s the need to use special escape sequences in this case?
- jchw 7y agoI dunno, but people are getting quite mad about me suggesting this feature should be removed, so I guess it is truly mandatory that our terminal emulators do this. Shortlinks are not good enough, phishing be damned?
- jhasse 7y agoI don't understand it either. Would https://gcc.gnu.org/cwe/123 https://gcc.gnu.org/cwe/123 really hurt so much?
- ziotom78 7y agoProbably because some URLs are really too long and would risk to fill the screen with too many characters. This particular instance implemented by GCC10 seems the perfect example: if your terminal has no support, you get a short string like CWE-415, which is probably enough for Google; but if your terminal does support this feature, clicking on it will immediately bring you to the right page.
- VadimPR 7y agoWhat telnet text are they using? The only hyperlinking in telnet I know of is MXP, http://www.zuggsoft.com/zmud/mxp.htm http://www.zuggsoft.com/zmud/mxp.htm.
- jbk 7y agoKonsole had security concerns about this feature: https://bugs.kde.org/show_bug.cgi?id=379294 https://bugs.kde.org/show_bug.cgi?id=379294
- guerrilla 7y agohow does on produce such a link in output? (not that i really want this bloat and increased attack surface)
- bonzini 7y agoEscape sequences. It's similar to the "tell the emulator about the current directory" feature that is used to open new windows on the current directory.
- labawi 7y agoDoes the CWD feature actually use terminal escape sequences? I always assumed the emulator accessed the working directory of the child process (as in /proc/$PID/cwd). On my terminal the CWD feature only seems to work for the topmost shell, and symlinks get resolved. EDIT: Linked bug report mentions OCS7 (presumably an escape sequence), as one of the ways to track CWD.
- jchw 7y agoThere’s a fair bit of documentation here. I’d try it but I don’t have any supported terminals on any of my machines... (usually I use kitty, but I have a couple machines with KDE and Konsole.) https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3c...
- zzo38computer 7y agoAnother that probably won't work is xterm (which I currently use). (And if I implement my own terminal emulator, I probably won't implement it either, as I would probably mainly implementing the features of xterm and of DEC terminals.)