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

Terminal hyperlinks support #9

Open
chubin opened this issue Feb 15, 2019 · 0 comments
Open

Terminal hyperlinks support #9

chubin opened this issue Feb 15, 2019 · 0 comments

Comments

@chubin
Copy link

chubin commented Feb 15, 2019

Terminal hyperlinks, that use the following notation:

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

(more on this here: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda )
are currently not supported (i.e. the whole string, including the hyperlink
is considered to be visible, what is generally speaking wrong; because
even the terminals that do not support hyperlinks show only the visible part of the link, the link caption).

Example:

$ # correct
$ python -c 'import ansiwrap; print ansiwrap.fill("This is a link. "*10); '
This is a link. This is a link. This is a link. This is a link. This
is a link. This is a link. This is a link. This is a link. This is a
link. This is a link.

$ # wrong
$ python -c 'import ansiwrap; print ansiwrap.fill("\x1B]8;;http://example.com\x1B\\This is a link\x1B]8;;\x1B\\. "*10); '
This is a link.
This is a link.
This is a link.
This is a link.
This is a link.
This is a link.
This is a link.
This is a link.
This is a link.
This is a link.

screenshot_2019-02-16_00-22-18

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

No branches or pull requests

1 participant