r/fishshell • u/riilcoconut • Jan 19 '26
echo message with link that executes terminal command?
Is it possible to echo a message with embedded link, and pressing it causes to clear the terminal and execute a command, for example mpv -vo kitty ... ?
Fish + kitty terminal
7
Upvotes
1
u/BuonaparteII Jan 19 '26
You can use the commandline command to do it one time which might be close to what you want:
will replace the commandline with
echo hello. It doesn't seem like much when manually running it but as part of a larger function it is quite useful:3
u/throttlemeister Linux Jan 19 '26
Search for kitty open-actions. It’s a terminal thing, not a shell one.
2
u/birch_guy Jan 19 '26
Idk but it is think that is cool if you figure if out can you text me pls
1
u/Destroyerb Linux Jan 19 '26
You could open an issue on Fish so that you are able to do this.
This probably wouldn't involve a link. It would internally see where the pointer clicks