Skip to content

Support hyperlinking escape chars #253

Open
@amterp

Description

@amterp

Hey, love the library, thanks to all the contributors' work on it!

There is a standard observed by some terminal emulators which is basically "hyperlink escape codes". You can try it with echo -e "\e]8;;https://example.com\aClick here\e]8;;\a" if your terminal supports it. There's a writeup here: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

I know this suggestion may be a little controversial for a couple of reasons:

  1. this is not colors
  2. it's not a universal standard

but my argument for 1) is that it's implemented similarly (escape codes) and italics/bolds also are not colors but are supported, so there's a precedent. For 2), the library recently started supporting e.g. custom RGB coloring which is also not universally supported, so once again, there's precedence.

Keen to get your thoughts, I think it'd be really handy and nice for fatih/color to support so we don't need another library to worry about + it will respect tty using the same, consistent approach :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions