Skip to content

Instantly share code, notes, and snippets.

@egmontkob
Last active October 17, 2025 13:03
Show Gist options
  • Save egmontkob/eb114294efbcd5adb1944c9f3cb5feda to your computer and use it in GitHub Desktop.
Save egmontkob/eb114294efbcd5adb1944c9f3cb5feda to your computer and use it in GitHub Desktop.

Revisions

  1. egmontkob revised this gist Mar 24, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators

    *[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore (except for perhaps a few exceptional occasions). ]*
    *[ Update 2025-03-24: Commenting is disabled permanently. Previous comments are archived at web.archive.org. ]*

    ---

  2. egmontkob revised this gist Apr 26, 2023. 1 changed file with 2 additions and 61 deletions.
    63 changes: 2 additions & 61 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators

    *[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore. The list of supporting software reflects the known state as of this date. ]*
    *[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore (except for perhaps a few exceptional occasions). ]*

    ---

    @@ -22,66 +22,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'

    ## Supporting apps

    ### Terminal emulators
    - [DomTerm](https://domterm.org/) 1.0.2
    - [hterm](https://chromium.googlesource.com/apps/libapps/+/master/hterm) 1.76
    - [hyper](https://hyper.is/) since Oct 2019, version ???
    - [iTerm2](http://iterm2.com/) 3.1
    - [Terminology](https://www.enlightenment.org/about-terminology) in git since 2018-10-14, probably will be released in version 1.3
    - [Ultimate++ terminal widget](https://github.com/ismail-yilmaz/upp-components/tree/master/CtrlLib/Terminal) since Nov 2019 (version ???)
    - based on [VTE](https://wiki.gnome.org/Apps/Terminal/VTE) 0.50: <sup>(Use 0.50.4, 0.52.2, or newer to avoid a rare crash)</sup>
    - [GNOME Terminal](https://wiki.gnome.org/Apps/Terminal) 3.26
    - [Guake](http://guake-project.org/) 3.2.1
    - [ROXTerm](https://github.com/realh/roxterm) 3.5.1
    - [Tilix](https://github.com/gnunn1/tilix) 1.5.8
    - [WezTerm](http://wezfurlong.org/wezterm/index.html) since early 2018

    ### Terminal Multiplexers
    - [TermySequence](https://termysequence.io/)

    ### Apps
    - [gcc](https://gcc.gnu.org/): Since version 10, for diagnostic messages to point to the documentation.
    - `less -R`: Preliminary patch available in the GNOME Terminal discussion.
    - `ls --hyperlink[=always/auto/never]` (`coreutils`): Since version 8.28.
    - [Matterhorn](https://github.com/matterhorn-chat/matterhorn) chat client: Since version 40400.0.0.
    - [mdcat](https://github.com/lunaryorn/mdcat) (markdown cat): Since version 0.5.0.
    - [Symfony](https://symfony.com/): Since version 4.3.
    - [systemd](https://github.com/systemd/systemd): Since version 239.
    - [wget2](https://gitlab.com/gnuwget/wget2/): Since Nov 2019 (version ???).

    ### Libraries
    - [vty](https://hackage.haskell.org/package/vty) medium-level terminal UI library: Since October 2017.
    - [brick](https://hackage.haskell.org/package/brick) high-level terminal UI library: Since October 2017.
    - [Rich](https://github.com/willmcgugan/rich) rich text formatting library: Since May 2020.

    ## Feature requests sent

    ### Terminal emulators
    - [Alacritty](https://github.com/alacritty/alacritty/issues/922)
    - [ConEmu](https://github.com/Maximus5/ConEmu/issues/2078)
    - [Kitty](https://github.com/kovidgoyal/kitty/issues/68) <sup>(The Linux and macOS terminal emulator. Not to be confused with the Windows PuTTY-fork named `KiTTY`.)</sup>
    - [Konsole](https://bugs.kde.org/show_bug.cgi?id=379294)
    - `VTE`-based:
    - [LilyTerm](https://github.com/Tetralet/LilyTerm/issues/117)
    - [LXDE Terminal](https://sourceforge.net/p/lxde/bugs/870/)
    - [MATE Terminal](https://github.com/mate-desktop/mate-terminal/issues/175)
    - [Sakura](https://bugs.launchpad.net/sakura/+bug/1686823)
    - [Terminator](https://bugs.launchpad.net/terminator/+bug/1686821) <sup>(The one for Linux written in Python, based on GTK+. Not to be confused with the one written in Java bearing the same name.)</sup>
    - [Termit](https://github.com/nonstop/termit/issues/109)
    - [Termite](https://github.com/thestinger/termite/issues/476)
    - [Tilda](https://github.com/lanoxx/tilda/issues/285)
    - [Xfce Terminal](https://bugzilla.xfce.org/show_bug.cgi?id=13534)
    - [Windows Terminal](https://github.com/microsoft/terminal/issues/204)
    - [xterm.js](https://github.com/xtermjs/xterm.js/issues/1134)

    ### Apps
    - [Irssi](https://github.com/irssi/irssi/issues/700)
    - [less -R](https://github.com/gwsw/less/issues/54)
    - [screen](https://savannah.gnu.org/bugs/index.php?50952)
    - [tbvaccine](https://github.com/skorokithakis/tbvaccine/issues/37)
    - [tmux](https://github.com/tmux/tmux/issues/911)
    - [weechat](https://github.com/weechat/weechat/issues/1252)
    - Planned to send request soon: vim, neovim, emacs, groff, find, grep.
    The list of supporting terminal emulators and terminal-based apps is no longer maintained here. It is kindly maintained by Alhadis in his [OSC 8 adoption in terminal emulators](https://github.com/Alhadis/OSC8-Adoption/) page.

    ## A few use cases

  3. egmontkob revised this gist May 31, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,8 @@

    *[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore. The list of supporting software reflects the known state as of this date. ]*

    ---

    Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).

    It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
  4. egmontkob revised this gist May 31, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    # Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators

    *[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore. The list of supporting software reflects the known state as of this date. ]*

    Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).

    It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
  5. egmontkob revised this gist May 13, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -48,6 +48,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    ### Libraries
    - [vty](https://hackage.haskell.org/package/vty) medium-level terminal UI library: Since October 2017.
    - [brick](https://hackage.haskell.org/package/brick) high-level terminal UI library: Since October 2017.
    - [Rich](https://github.com/willmcgugan/rich) rich text formatting library: Since May 2020.

    ## Feature requests sent

  6. egmontkob revised this gist Apr 29, 2020. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -54,7 +54,6 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    ### Terminal emulators
    - [Alacritty](https://github.com/alacritty/alacritty/issues/922)
    - [ConEmu](https://github.com/Maximus5/ConEmu/issues/2078)
    - [hyper](https://github.com/zeit/hyper/issues/2501)
    - [Kitty](https://github.com/kovidgoyal/kitty/issues/68) <sup>(The Linux and macOS terminal emulator. Not to be confused with the Windows PuTTY-fork named `KiTTY`.)</sup>
    - [Konsole](https://bugs.kde.org/show_bug.cgi?id=379294)
    - `VTE`-based:
  7. egmontkob revised this gist Apr 29, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -74,6 +74,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [Irssi](https://github.com/irssi/irssi/issues/700)
    - [less -R](https://github.com/gwsw/less/issues/54)
    - [screen](https://savannah.gnu.org/bugs/index.php?50952)
    - [tbvaccine](https://github.com/skorokithakis/tbvaccine/issues/37)
    - [tmux](https://github.com/tmux/tmux/issues/911)
    - [weechat](https://github.com/weechat/weechat/issues/1252)
    - Planned to send request soon: vim, neovim, emacs, groff, find, grep.
  8. egmontkob revised this gist Apr 29, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,8 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'

    ### Terminal emulators
    - [DomTerm](https://domterm.org/) 1.0.2
    - [hterm](https://chromium.googlesource.com/apps/libapps/+/master/hterm) 1.76
    - [hterm](https://chromium.googlesource.com/apps/libapps/+/master/hterm) 1.76
    - [hyper](https://hyper.is/) since Oct 2019, version ???
    - [iTerm2](http://iterm2.com/) 3.1
    - [Terminology](https://www.enlightenment.org/about-terminology) in git since 2018-10-14, probably will be released in version 1.3
    - [Ultimate++ terminal widget](https://github.com/ismail-yilmaz/upp-components/tree/master/CtrlLib/Terminal) since Nov 2019 (version ???)
  9. egmontkob revised this gist Apr 14, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -40,6 +40,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - `ls --hyperlink[=always/auto/never]` (`coreutils`): Since version 8.28.
    - [Matterhorn](https://github.com/matterhorn-chat/matterhorn) chat client: Since version 40400.0.0.
    - [mdcat](https://github.com/lunaryorn/mdcat) (markdown cat): Since version 0.5.0.
    - [Symfony](https://symfony.com/): Since version 4.3.
    - [systemd](https://github.com/systemd/systemd): Since version 239.
    - [wget2](https://gitlab.com/gnuwget/wget2/): Since Nov 2019 (version ???).

  10. egmontkob revised this gist Apr 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -218,7 +218,7 @@ Moreover, there's no "Referer" leakage to worry about.

    That being said, a few points have been raised that are worth noting here.

    Some locally installed applications might a register handle for some custom URI scheme (e.g. `foobar://`), and the handler application might be vulnerable in case the rest of the URI is maliciously crafted. Terminal emulators might decide to whitelist only some well known schemes and ask for the user's confirmation on less known ones.
    Some locally installed applications might register a handle for some custom URI scheme (e.g. `foobar://`), and the handler application might be vulnerable in case the rest of the URI is maliciously crafted. Terminal emulators might decide to whitelist only some well known schemes and ask for the user's confirmation on less known ones.

    Some are worried that this feature is unexpected from users, and that introducing this somewhat automated link between the terminal and the browser works against the concept of "defense in depth". That is, it's possible that a multi-step attack, exploiting a vulnerability of a website, takes place by using social engineering to get someone follow such a link that they somehow receive in the terminal emulator. It's out of the scope of this specification to deal with such scenarios, this specification can only be responsible for direct security vulnerabilities that it might open. However, terminal emulators might consider adding the following lines of defense. They shouldn't open the link on a simple mouse click (that's for copy-pasting or reporting mouse events typically, anyway), only on some more complex user action such as Ctrl+click or via the right-click menu. They should let the user know the URI upfront. They could decide to present a confirmation dialog before opening it. They could even offer to disable this feature (or even have it disabled by default). People working in critical environments (or their sysadmins) could decide to disable this feature entirely.

  11. egmontkob revised this gist Apr 10, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -70,7 +70,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'

    ### Apps
    - [Irssi](https://github.com/irssi/irssi/issues/700)
    - [less -R](http://www.greenwoodsoftware.com/less/bugs.html) (ref number 308)
    - [less -R](https://github.com/gwsw/less/issues/54)
    - [screen](https://savannah.gnu.org/bugs/index.php?50952)
    - [tmux](https://github.com/tmux/tmux/issues/911)
    - [weechat](https://github.com/weechat/weechat/issues/1252)
  12. egmontkob revised this gist Mar 28, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -188,7 +188,7 @@ Any terminal that correctly implements OSC parsing according to ECMA-48 is guara

    If a terminal emits garbage upon an OSC 8 explicit hyperlink sequence, that terminal is buggy according to ECMA-48. It is, and will always be, outside of the scope of this specification to deal with buggy terminals.

    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.46.2 and 0.48.1, [Windows Terminal](https://github.com/microsoft/terminal/issues/3081) up to 0.9, Emacs's built-in terminal, and [screen](https://savannah.gnu.org/bugs/index.php?57718) with 700+ character long URLs.
    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.46.2 and 0.48.1, Windows Terminal up to 0.9, Emacs's built-in terminal, and [screen](https://savannah.gnu.org/bugs/index.php?57718) with 700+ character long URLs.

    ## Length limits

  13. egmontkob revised this gist Mar 28, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -65,8 +65,8 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [Termite](https://github.com/thestinger/termite/issues/476)
    - [Tilda](https://github.com/lanoxx/tilda/issues/285)
    - [Xfce Terminal](https://bugzilla.xfce.org/show_bug.cgi?id=13534)
    - [xterm.js](https://github.com/xtermjs/xterm.js/issues/1134)
    - [Windows Terminal](https://github.com/microsoft/terminal/issues/204)
    - [xterm.js](https://github.com/xtermjs/xterm.js/issues/1134)

    ### Apps
    - [Irssi](https://github.com/irssi/irssi/issues/700)
  14. egmontkob revised this gist Mar 28, 2020. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -50,6 +50,9 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    ## Feature requests sent

    ### Terminal emulators
    - [Alacritty](https://github.com/alacritty/alacritty/issues/922)
    - [ConEmu](https://github.com/Maximus5/ConEmu/issues/2078)
    - [hyper](https://github.com/zeit/hyper/issues/2501)
    - [Kitty](https://github.com/kovidgoyal/kitty/issues/68) <sup>(The Linux and macOS terminal emulator. Not to be confused with the Windows PuTTY-fork named `KiTTY`.)</sup>
    - [Konsole](https://bugs.kde.org/show_bug.cgi?id=379294)
    - `VTE`-based:
    @@ -63,9 +66,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [Tilda](https://github.com/lanoxx/tilda/issues/285)
    - [Xfce Terminal](https://bugzilla.xfce.org/show_bug.cgi?id=13534)
    - [xterm.js](https://github.com/xtermjs/xterm.js/issues/1134)
    - [hyper](https://github.com/zeit/hyper/issues/2501)
    - [Windows Terminal](https://github.com/microsoft/terminal/issues/204)
    - [ConEmu](https://github.com/Maximus5/ConEmu/issues/2078)

    ### Apps
    - [Irssi](https://github.com/irssi/irssi/issues/700)
  15. egmontkob revised this gist Mar 22, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -187,7 +187,7 @@ Any terminal that correctly implements OSC parsing according to ECMA-48 is guara

    If a terminal emits garbage upon an OSC 8 explicit hyperlink sequence, that terminal is buggy according to ECMA-48. It is, and will always be, outside of the scope of this specification to deal with buggy terminals.

    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.46.2 and 0.48.1, [Windows Terminal](https://github.com/microsoft/terminal/issues/3081) (currently checked at version 0.8), Emacs's built-in terminal, and [screen](https://savannah.gnu.org/bugs/index.php?57718) with 700+ character long URLs.
    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.46.2 and 0.48.1, [Windows Terminal](https://github.com/microsoft/terminal/issues/3081) up to 0.9, Emacs's built-in terminal, and [screen](https://savannah.gnu.org/bugs/index.php?57718) with 700+ character long URLs.

    ## Length limits

  16. egmontkob revised this gist Mar 11, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -65,6 +65,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [xterm.js](https://github.com/xtermjs/xterm.js/issues/1134)
    - [hyper](https://github.com/zeit/hyper/issues/2501)
    - [Windows Terminal](https://github.com/microsoft/terminal/issues/204)
    - [ConEmu](https://github.com/Maximus5/ConEmu/issues/2078)

    ### Apps
    - [Irssi](https://github.com/irssi/irssi/issues/700)
  17. egmontkob revised this gist Feb 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -186,7 +186,7 @@ Any terminal that correctly implements OSC parsing according to ECMA-48 is guara

    If a terminal emits garbage upon an OSC 8 explicit hyperlink sequence, that terminal is buggy according to ECMA-48. It is, and will always be, outside of the scope of this specification to deal with buggy terminals.

    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.46.2 and 0.48.1, [Windows Terminal](https://github.com/microsoft/terminal/issues/3081) (currently checked at version 0.8), and Emacs's built-in terminal.
    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.46.2 and 0.48.1, [Windows Terminal](https://github.com/microsoft/terminal/issues/3081) (currently checked at version 0.8), Emacs's built-in terminal, and [screen](https://savannah.gnu.org/bugs/index.php?57718) with 700+ character long URLs.

    ## Length limits

  18. egmontkob revised this gist Feb 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -186,7 +186,7 @@ Any terminal that correctly implements OSC parsing according to ECMA-48 is guara

    If a terminal emits garbage upon an OSC 8 explicit hyperlink sequence, that terminal is buggy according to ECMA-48. It is, and will always be, outside of the scope of this specification to deal with buggy terminals.

    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.46.2 and 0.48.1, as well as [Windows Terminal](https://github.com/microsoft/terminal/issues/3081) (currently checked at version 0.8).
    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.46.2 and 0.48.1, [Windows Terminal](https://github.com/microsoft/terminal/issues/3081) (currently checked at version 0.8), and Emacs's built-in terminal.

    ## Length limits

  19. egmontkob revised this gist Feb 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ Most of the terminal emulators auto-detect when a URL appears onscreen and allow

    It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.

    In spring 2017, `GNOME Terminal` and `iTerm2` hav0e changed this.
    In spring 2017, `GNOME Terminal` and `iTerm2` have changed this.

    `GNOME Terminal` is based on the `VTE` widget, and almost all of this work went to `VTE`. As such, we expect other `VTE`-based terminal emulators to catch up and add support really soon. Other terminal emulators are also welcome and encouraged to join!

  20. egmontkob revised this gist Feb 1, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ Most of the terminal emulators auto-detect when a URL appears onscreen and allow

    It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.

    In spring 2017, `GNOME Terminal` and `iTerm2` have changed this.
    In spring 2017, `GNOME Terminal` and `iTerm2` hav0e changed this.

    `GNOME Terminal` is based on the `VTE` widget, and almost all of this work went to `VTE`. As such, we expect other `VTE`-based terminal emulators to catch up and add support really soon. Other terminal emulators are also welcome and encouraged to join!

    @@ -186,7 +186,7 @@ Any terminal that correctly implements OSC parsing according to ECMA-48 is guara

    If a terminal emits garbage upon an OSC 8 explicit hyperlink sequence, that terminal is buggy according to ECMA-48. It is, and will always be, outside of the scope of this specification to deal with buggy terminals.

    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.44.x, 0.46.2 and 0.48.1, as well as [Windows Terminal](https://github.com/microsoft/terminal/issues/3081) (currently checked at version 0.8).
    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.46.2 and 0.48.1, as well as [Windows Terminal](https://github.com/microsoft/terminal/issues/3081) (currently checked at version 0.8).

    ## Length limits

  21. egmontkob revised this gist Feb 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -182,7 +182,7 @@ The hyperlink feature should be used for providing convenient quick access to a

    ## Backward compatibility

    Any terminal that correctly implements OSC parsing according to ECMA-48 is guaranteed not to suffer from compatibility issues. That is, even if explicit hyperlinks aren't supported, the target URI is silently ignored and the supposed-to-be-visible text is display, without artifacts.
    Any terminal that correctly implements OSC parsing according to ECMA-48 is guaranteed not to suffer from compatibility issues. That is, even if explicit hyperlinks aren't supported, the target URI is silently ignored and the supposed-to-be-visible text is displayed, without artifacts.

    If a terminal emits garbage upon an OSC 8 explicit hyperlink sequence, that terminal is buggy according to ECMA-48. It is, and will always be, outside of the scope of this specification to deal with buggy terminals.

  22. egmontkob revised this gist Feb 1, 2020. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -178,8 +178,6 @@ Fullscreen apps that do not switch to the "alternate screen" of the terminal emu

    Currently there's no way of detecting whether the terminal emulator supports hyperlinks. We're hoping to address this at some point in the future.

    Until then, almost all terminal emulators ignore the OSC sequences they don't know about, so emitting OSC 8 will result in the anchor text not becoming a hyperlink, and the target URI getting lost. (Unfortunately `VTE` prior to 0.48.2 is an exception, it prints the URI plus some garbage too.)

    The hyperlink feature should be used for providing convenient quick access to a target URI, but (at least by default) should not be the only means of figuring out the target.

    ## Backward compatibility
  23. egmontkob revised this gist Feb 1, 2020. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -182,6 +182,14 @@ Until then, almost all terminal emulators ignore the OSC sequences they don't kn

    The hyperlink feature should be used for providing convenient quick access to a target URI, but (at least by default) should not be the only means of figuring out the target.

    ## Backward compatibility

    Any terminal that correctly implements OSC parsing according to ECMA-48 is guaranteed not to suffer from compatibility issues. That is, even if explicit hyperlinks aren't supported, the target URI is silently ignored and the supposed-to-be-visible text is display, without artifacts.

    If a terminal emits garbage upon an OSC 8 explicit hyperlink sequence, that terminal is buggy according to ECMA-48. It is, and will always be, outside of the scope of this specification to deal with buggy terminals.

    At this moment, terminals known to be buggy (OSC 8 resulting in display corruption) are VTE versions up to 0.44.x, 0.46.2 and 0.48.1, as well as [Windows Terminal](https://github.com/microsoft/terminal/issues/3081) (currently checked at version 0.8).

    ## Length limits

    Terminal emulators traditionally use maybe a dozen or so bytes per cell. Adding hyperlinks potentially increases it by magnitudes. As such, it's tricky to implement this feature in terminal emulators (without consuming way too much memory), and they probably want to expose some safety limits.
  24. egmontkob revised this gist Jan 9, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -29,7 +29,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [Guake](http://guake-project.org/) 3.2.1
    - [ROXTerm](https://github.com/realh/roxterm) 3.5.1
    - [Tilix](https://github.com/gnunn1/tilix) 1.5.8
    - [WezTerm](http://wezfurlong.org/wezterm/index.html)
    - [WezTerm](http://wezfurlong.org/wezterm/index.html) since early 2018

    ### Terminal Multiplexers
    - [TermySequence](https://termysequence.io/)
  25. egmontkob revised this gist Jan 9, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [Guake](http://guake-project.org/) 3.2.1
    - [ROXTerm](https://github.com/realh/roxterm) 3.5.1
    - [Tilix](https://github.com/gnunn1/tilix) 1.5.8
    - [WezTerm](http://wezfurlong.org/wezterm/index.html)

    ### Terminal Multiplexers
    - [TermySequence](https://termysequence.io/)
    @@ -63,6 +64,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [Xfce Terminal](https://bugzilla.xfce.org/show_bug.cgi?id=13534)
    - [xterm.js](https://github.com/xtermjs/xterm.js/issues/1134)
    - [hyper](https://github.com/zeit/hyper/issues/2501)
    - [Windows Terminal](https://github.com/microsoft/terminal/issues/204)

    ### Apps
    - [Irssi](https://github.com/irssi/irssi/issues/700)
  26. egmontkob revised this gist Nov 27, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [TermySequence](https://termysequence.io/)

    ### Apps
    - [gcc](https://gcc.gnu.org/): Since version 10 (???), for diagnostic messages to point to the documentation.
    - [gcc](https://gcc.gnu.org/): Since version 10, for diagnostic messages to point to the documentation.
    - `less -R`: Preliminary patch available in the GNOME Terminal discussion.
    - `ls --hyperlink[=always/auto/never]` (`coreutils`): Since version 8.28.
    - [Matterhorn](https://github.com/matterhorn-chat/matterhorn) chat client: Since version 40400.0.0.
  27. egmontkob revised this gist Nov 27, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [hterm](https://chromium.googlesource.com/apps/libapps/+/master/hterm) 1.76
    - [iTerm2](http://iterm2.com/) 3.1
    - [Terminology](https://www.enlightenment.org/about-terminology) in git since 2018-10-14, probably will be released in version 1.3
    - [Ultimate++ terminal widget](https://github.com/ismail-yilmaz/upp-components/tree/master/CtrlLib/Terminal)
    - [Ultimate++ terminal widget](https://github.com/ismail-yilmaz/upp-components/tree/master/CtrlLib/Terminal) since Nov 2019 (version ???)
    - based on [VTE](https://wiki.gnome.org/Apps/Terminal/VTE) 0.50: <sup>(Use 0.50.4, 0.52.2, or newer to avoid a rare crash)</sup>
    - [GNOME Terminal](https://wiki.gnome.org/Apps/Terminal) 3.26
    - [Guake](http://guake-project.org/) 3.2.1
  28. egmontkob revised this gist Nov 27, 2019. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -23,6 +23,7 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [hterm](https://chromium.googlesource.com/apps/libapps/+/master/hterm) 1.76
    - [iTerm2](http://iterm2.com/) 3.1
    - [Terminology](https://www.enlightenment.org/about-terminology) in git since 2018-10-14, probably will be released in version 1.3
    - [Ultimate++ terminal widget](https://github.com/ismail-yilmaz/upp-components/tree/master/CtrlLib/Terminal)
    - based on [VTE](https://wiki.gnome.org/Apps/Terminal/VTE) 0.50: <sup>(Use 0.50.4, 0.52.2, or newer to avoid a rare crash)</sup>
    - [GNOME Terminal](https://wiki.gnome.org/Apps/Terminal) 3.26
    - [Guake](http://guake-project.org/) 3.2.1
    @@ -33,11 +34,13 @@ printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
    - [TermySequence](https://termysequence.io/)

    ### Apps
    - [gcc](https://gcc.gnu.org/): Since version 10 (???), for diagnostic messages to point to the documentation.
    - `less -R`: Preliminary patch available in the GNOME Terminal discussion.
    - `ls --hyperlink[=always/auto/never]` (`coreutils`): Since version 8.28.
    - [Matterhorn](https://github.com/matterhorn-chat/matterhorn) chat client: Since version 40400.0.0.
    - [mdcat](https://github.com/lunaryorn/mdcat) (markdown cat): Since version 0.5.0.
    - [systemd](https://github.com/systemd/systemd): Since version 239.
    - [wget2](https://gitlab.com/gnuwget/wget2/): Since Nov 2019 (version ???).

    ### Libraries
    - [vty](https://hackage.haskell.org/package/vty) medium-level terminal UI library: Since October 2017.
  29. egmontkob revised this gist May 17, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -197,7 +197,7 @@ Due to the syntax, additional parameter values cannot contain the `:` and `;` ch

    ## Security

    This feature doesn't introduce anything that's not already present while browsing the web. Therefore we believe security isn't a thing to worry about.
    This feature doesn't introduce anything that's not already present while browsing the web. Therefore we believe this feature doesn't have security aspects to worry about.

    In particular, if a webpage is exploitable by making someone visit a URL, passing along their cookies (e.g. doesn't have proper CSRF protection), it's already exploitable from a malicious website.

  30. egmontkob revised this gist Mar 26, 2019. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions Hyperlinks_in_Terminal_Emulators.md
    Original file line number Diff line number Diff line change
    @@ -195,6 +195,20 @@ For portability, the parameters and the URI must not contain any bytes outside o

    Due to the syntax, additional parameter values cannot contain the `:` and `;` characters either. If required at a future extension, some escaping (such as URI-encoding or base64) should be chosen. (Should there ever be an extension to specify hover colors or attributes, I recommend considering going for the ANSI color and attribute notation with the upper dots removed, e.g. bold italic light gray `1;3;38:5:255` would become `1,3,38.5.255`.)

    ## Security

    This feature doesn't introduce anything that's not already present while browsing the web. Therefore we believe security isn't a thing to worry about.

    In particular, if a webpage is exploitable by making someone visit a URL, passing along their cookies (e.g. doesn't have proper CSRF protection), it's already exploitable from a malicious website.

    Moreover, there's no "Referer" leakage to worry about.

    That being said, a few points have been raised that are worth noting here.

    Some locally installed applications might a register handle for some custom URI scheme (e.g. `foobar://`), and the handler application might be vulnerable in case the rest of the URI is maliciously crafted. Terminal emulators might decide to whitelist only some well known schemes and ask for the user's confirmation on less known ones.

    Some are worried that this feature is unexpected from users, and that introducing this somewhat automated link between the terminal and the browser works against the concept of "defense in depth". That is, it's possible that a multi-step attack, exploiting a vulnerability of a website, takes place by using social engineering to get someone follow such a link that they somehow receive in the terminal emulator. It's out of the scope of this specification to deal with such scenarios, this specification can only be responsible for direct security vulnerabilities that it might open. However, terminal emulators might consider adding the following lines of defense. They shouldn't open the link on a simple mouse click (that's for copy-pasting or reporting mouse events typically, anyway), only on some more complex user action such as Ctrl+click or via the right-click menu. They should let the user know the URI upfront. They could decide to present a confirmation dialog before opening it. They could even offer to disable this feature (or even have it disabled by default). People working in critical environments (or their sysadmins) could decide to disable this feature entirely.

    ## Links

    - [GNOME Terminal discussion](https://bugzilla.gnome.org/show_bug.cgi?id=779734)