You are not logged in.
xfce4 terminal makes hyperlinks clickable. Is there any way to make file links like this clickable?
./to/file.c:10:20
/path/to/file.c:10:20
I would like to have be able to click on them and have them open with $EDITOR or maybe some other environment variable.
If its not possible with xfcd4 terminal, can anyone recommend another terminal which does this?
Offline
I don't know if that would make sense since your in a terminal.
$editor /path/to/file
opens the file in the editor of your choice.
/path/to/file
and then click to open in $editor seem like extra steps to me.
Siduction
Debian Sid
Xfce 4.18
Offline
LOL, I've never seen clickable file links in terminal.
As an example, none of the answers here suggests anything like that, all of them are some form of what eriefisher said.
edit: Welcome to the forum, twostepted!
Last edited by alcornoqui (2020-05-06 09:26:03)
Offline
echo "file:///var/log/Xorg.0.log"
...then Control+click on the "file:///...." link. (It should open in your default editor).
However, to OP's question, it only works if the filename is presented in the format above and it does not work with line/character indicators - so you won't be able to jump to a specific place in the text. I'm don't think make can present the file in that format.
I'm unaware of a terminal that does this.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
The embedded terminal in VSCode does this, but only in the context of that IDE.
Offline
Thank you all for your responses. I didn't notice them until now as I turned off form emails when I registered (oops).
I do use vscode so maybe i can get used to its terminal.
@eriefisher I'm not sure what you mean. I'm really just looking for quick ways to open file links from the terminal with a particular editor (vim, kakoune, vscode). I don't want to have to do additional clicking or enter commands during development. In fact i'd prefer no clicking and be able to use the keyboard.
@alcornoqui hyperlinks and file:// links are already clickable. Maybe there is some way to create a plugin which turns file paths into file:// links.
Offline
I'm not a keyboard warrior but it seems to me that if I just tell the editor to open a file would be faster than navigating to it then clicking on it. If the file is in the current directory the there is no navigation. ie with vim:
vim filename
By default file paths are not "links" as you know. You would still have to somehow enter the path for a link to be created or somehow select the file then have it converted to a link. This type of behavior does exist in Thunar. In the address bar, if you enter the file path and hit enter it will open in your preferred editor. There it makes sense and is usable.
Maybe I'm not understanding the question?
Siduction
Debian Sid
Xfce 4.18
Offline
[ Generated in 0.013 seconds, 10 queries executed - Memory usage: 542.8 KiB (Peak: 544.08 KiB) ]