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 hyperlinks to source files in traceback #37

Open
stuaxo opened this issue Apr 23, 2020 · 5 comments
Open

Add hyperlinks to source files in traceback #37

stuaxo opened this issue Apr 23, 2020 · 5 comments

Comments

@stuaxo
Copy link

stuaxo commented Apr 23, 2020

There is a specification for hyperlinks in terminals

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

It would be good if TBVacine could link to the python files mentioned.

Currently there isn't a way of linking to particular lines, but being able to open a file from the terminal is a nice improvement.

This may be worth gating behind config or envvar in case a terminal doesn't support it (though most should display nothing where the link will be anyway)

@skorokithakis
Copy link
Owner

Hmm, that's interesting, but that's for HTTP hyperlinks, how can we link to something in the FS (and what happens when you click on that)?

@stuaxo stuaxo changed the title Add hyperlinks to python files. Add hyperlinks to source files in traceback Apr 23, 2020
@stuaxo
Copy link
Author

stuaxo commented Apr 23, 2020

You make a link like file:///path/to/file

try ls --hyper to see it in action, here's is what it looks like for me in Tilix, I can right click and open files:

image

@skorokithakis
Copy link
Owner

Oh huh, I see, thanks. My terminal doesn't support it, but I'll try it on some other one.

@stuaxo
Copy link
Author

stuaxo commented Apr 23, 2020

There's a list of terminals and versions that currently support it at the top of the gist :)

@egmontkob
Copy link

egmontkob commented Apr 29, 2020

You make a link like file:///path/to/file

Note: See the terminal hyperlink spec why the hostname component really should not be omitted, i.e. use file://hostname/path/to/file.

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

3 participants