-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
Comments
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) |
I opened an issue against the windows console to support it |
@ssbarnea Colorama is not focused on this kind of thing. However, I made a convenience function in my utility module you might like: |
@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.. |
@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. |
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 |
See https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda for details as is already implemented by some major terminals.
The text was updated successfully, but these errors were encountered: