piotrmurach / tty

Toolkit for developing sleek command line apps.
https://ttytoolkit.org
MIT License
2.5k stars 78 forks source link

Feature request: add hyperlinks support #55

Closed radarek closed 5 years ago

radarek commented 5 years ago

Describe the problem

Some terminals support hyperlinks. You can try following code in terminal:

printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'

In iTerm it prints underlined This is a link and hovering it with cmd key I'm able to click on it and browser opens http://example.com link.

It would be nice to have a gem to:

piotrmurach commented 5 years ago

Hey Radek,

Thank you for making me aware of this! I think this is useful but I'm not 100% sure it deserves it's own gem, after all, it's a single line of code. But I will think about it. Maybe a single tty package that detects and implements links, let's see. However, there is a place I could totally use this feature in tty-markdown

piotrmurach commented 5 years ago

Hey @radarek I have goods news, your suggestion is now reality tty-link. Enjoy!