-
-
Notifications
You must be signed in to change notification settings - Fork 817
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
Allow clicking on results in terminal to open folder or file viewer #1563
Comments
Fixes: sharkdp#1295 Fixes: sharkdp#1563
Fixes: sharkdp#1295 Fixes: sharkdp#1563
This is a duplicate of #1295 |
Fixes: sharkdp#1295 Fixes: sharkdp#1563
Fixes: sharkdp#1295 Fixes: sharkdp#1563
#1571 is a great start, but arguably doesn't fully close this issue: as @schallm suggests in the description of this issue, adopting ripgrep's |
Moving conversation from PR discussion #1571 (comment):
Thanks! OK, but there are at least two problems with that (which is probably why you said "sort of possible"):
Here's the best I've come up with so far (thanks for showing the fd() {
command fd --color=always --hyperlink=always "$@" |
rg -r $'\e]8;;vscode://file$1' $'^\e]8;;file://'$(hostname)'(.*)'
} Some examples of editors/IDEs supporting custom protocols I'm aware of are But I imagine there are others. Definitely understand opting for a simple initial implementation but given So I guess the main question is forwards-compatibility. Seems like e.g. And then for a fully custom protocol / URL format, |
Could we open a new issue for this? |
Absolutely. #1597 |
Would love to see something similar to
ripgrep
's new--hyperlink-format
option. ( 14.0.0 release ) It so helpful to be able to open matching files and even have it jump line number of matched text. It would be great iffd
allowed something similar.For example:
--folder-hyperlink-format default
and allowing overrides like the following to open directory a new default shell--folder-hyperlink-format shell
ripgrep
's handler and open the file with the OS's default handler with--file-hyperlink-format default
and allow overrides for common tools like vscode with--file-hyperlink-format vscode
The text was updated successfully, but these errors were encountered: