Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ANSI hyperlinks #134

Open
ssbarnea opened this issue Jun 21, 2017 · 6 comments
Open

Add support for ANSI hyperlinks #134

ssbarnea opened this issue Jun 21, 2017 · 6 comments

Comments

@ssbarnea
Copy link

See https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda for details as is already implemented by some major terminals.

@wiggin15
Copy link
Collaborator

wiggin15 commented Sep 3, 2017

Hi. Thanks for the suggestion. colorama is intended to interpret ANSI codes and convert them so they work in both Linux and Windows. In the list of terminals in the link you provided, I don't see any Windows-based terminals (cmd, PowerShell). If we can't convert the ANSI codes to Windows on Windows machines, there is no point in adding the codes to colorama.. See also the same reasoning in #38 (comment)

@stuaxo
Copy link

stuaxo commented Jun 4, 2018

I opened an issue against the windows console to support it

microsoft/terminal#204

ssbarnea added a commit to ssbarnea/colorama that referenced this issue Jun 5, 2018
@mixmastamyk
Copy link

@ssbarnea Colorama is not focused on this kind of thing.

However, I made a convenience function in my utility module you might like:
https://github.com/mixmastamyk/console/blob/master/console/utils.py#L54

@ssbarnea
Copy link
Author

@mixmastamyk I already have a working function https://github.com/pycontribs/gri/blob/master/gri/__main__.py#L31-L32 that was not the problem.

The problem is that I wanted to make it easy for anyone writing python code to use it, and colorama is the probably the best place to implement that functionality.

One way or another colorama is an ANSI processing library, that is an ansi extension. We could easily document that this works only on some terminal.

We already have a rough time dealing with dependencies, creating another module for a one-lines is a very bad idea from the maintenance point of view.

I personally do not see any issue extending functionality, especially if we add a notice regarding support..

@mixmastamyk
Copy link

mixmastamyk commented Jan 24, 2020

@ssbarnea Well, colorama is not an ansi-utility-library per se.

It's really an "enable your existing ansi-utility-library to work on Windows" library. One that has served its purpose now that MS is finally getting it together on that front. Colorama is probably now in maintenance mode.

There are other libraries that might make more sense to add this to.

@jquast
Copy link

jquast commented Feb 3, 2020

Windows 10 supports sequences without any translation layer, https://devblogs.microsoft.com/commandline/24-bit-color-in-the-windows-console/ so I'm not entirely sold on colorama's future as a necessary translator :( I think because of what colorama is, the feature would not be supported in this library.

But I hope to help, the library blessed does windows 10, even inside cmd.exe, the only missing bits was the database of sequences, which @avylove provided with his "jinxed" library, anyway blessed also has this hyperlink feature support you seek, https://blessed.readthedocs.io/en/latest/terminal.html#hyperlinks

best wishes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants