sachaos / viddy

👀 A modern watch command. Time machine and pager etc.
MIT License
4.76k stars 94 forks source link

Support hyperlinks #161

Open avamsi opened 2 weeks ago

avamsi commented 2 weeks ago

Viddy doesn't seem to be rendering OSC 8 hyperlinks (https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda). https://github.com/ratatui/ratatui/issues/1028 seems related -- it looks like there's a workaround (https://github.com/ratatui/ratatui/issues/1028#issuecomment-2078300439) but I'm not even sure if I'm reading it right and if it's a useable workaround.


Repro:

$ cat /tmp/example.py
print("\x1b]8;;http://example.com\x1b\\Example Domain\x1b]8;;\x1b\\")

python /tmp/example.py outputs Example Domain linking it to http://example.com (as expected). viddy python /tmp/example.py outputs Example Domain but (seemingly) as plain text.

avamsi commented 2 weeks ago

I.. ended up writing my own watch command https://github.com/avamsi/dekh for when I really need hyperlinks (and to play around with bubbletea), but it's really barebones and doesn't have pretty much any features that viddy has.

It does uh, "borrow" its header from viddy :) --

dekh screenshot