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

Support hyperlink escape sequence (OSC 8) #15861

Open
knuesel opened this issue Feb 23, 2024 · 3 comments
Open

Support hyperlink escape sequence (OSC 8) #15861

knuesel opened this issue Feb 23, 2024 · 3 comments

Comments

@knuesel
Copy link

knuesel commented Feb 23, 2024

It would be great to show OSC 8 escape sequences as URLs instead of the control character gibberish.

For example executing print("\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n") shows

\e]8;;[http://example.com\e\This](http://example.com/e/This) is a link\e]8;;\e\

instead of a link like in a terminal.

The OSC 8 standard is relatively recent but already supported by many terminals and applications: https://github.com/Alhadis/OSC8-Adoption/

Copy link

welcome bot commented Feb 23, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@FoSuCloud
Copy link
Contributor

You can see that the terminal of jupyterlab can achieve the expected results.
The definition of the OSC 8 project is "adoption in terminal emulators"
Is it necessary to support it in notebook?
截屏2024-02-29 09 15 37

@knuesel
Copy link
Author

knuesel commented Feb 29, 2024

OSC 8 support in the notebook is necessary for correct display of cell outputs that include these escape sequences.

Currently some error messages look like this:

image

but they should look like this:

image

Note in the first image that Notebook already supports many escape sequences: the red foreground and dark background colors are correctly rendered. But the hyperlink is shown as duplicated URL mixed in with gibberish.

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

No branches or pull requests

3 participants