-
Notifications
You must be signed in to change notification settings - Fork 405
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 displaying files and commits as OSC 8 hyperlinks #257
Comments
I tried to use But I tested your patch in These are the Arch Linux's the result, with or without the I'm using KDE's Konsole as my main terminal, and XTerm, but the line numbers or the filename is not a link. What I'm doing wrong? or the Konsole terminal doesn't support this? |
@navarroaxel Can you try with a terminal emulator that definitely supports the hyperlinks? Based on the links in https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda I fear that Konsole does not yet. |
Works in a Konsole's PR still not merged! But don't open the editor in the line I clicked, should you add Could you add support for commit SHA links to GitLab or custom GitLab servers? like https://invent.kde.org/utilities/konsole/-/commit/f8e06d55a2d2a7e322cc980052aa86d67d3aae17 |
Hi @navarroaxel (cc @Kr1ss-XD), this is discussed in the help text for the
That's a custom URL scheme that I just made up for my use. So it will emit URLs that look like the common (but non-standardized) "compiler output format", but with URL syntax, and without column number: e.g.
The utility currently supports opening in VSCode, Sublime, Emacsclient and PyCharm, and has instructions for registering the URL handler in MacOS. If you can see a more streamlined way for delta users to do this, please let me know! (what supports
Yeah, I was lazy and only added GitHub so far, I'll do GitLab! So that would be URLs of the format https://gitlab.com/gnachman/iterm2/-/commit/4600e60a0494d630ac25a277940bbd6359d89565, correct? Do you have an example of what the URL would look like for a custom GitLab server? The information delta is using is the git remote URL ( |
@navarroaxel almost a year later but your suggestion is now implemented on master (there'll be a release soon). See #613 |
Thanks awesome @dandavison! 🤩 I'll test it sooner |
This proposal introduces a spec for displaying hyperlinks in terminal emulators. Support for it among terminal emulators is already good, with more pending. Unfortunately neither less -R nor tmux support it yet, so for now Delta users would only be able to benefit by (a) using a fork of
less
(and tmux), or (b) not usingless
(or tmux) with delta.In any case, two ways in which delta could make use of this feature are
file://
links.Both these would be optimistic: delta just receives text on stdin and there's no guarantee that the files in that text have ever existed anywhere! Also delta doesn't need to be invoked inside a git repo, and I think perhaps neither type of link-formatting should be done when delta is not invoked inside a git repo.
The text was updated successfully, but these errors were encountered: