Skip to content
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

feat: use OSC-8 for file:// links #272

Open
WhyNotHugo opened this issue Mar 20, 2024 · 0 comments
Open

feat: use OSC-8 for file:// links #272

WhyNotHugo opened this issue Mar 20, 2024 · 0 comments

Comments

@WhyNotHugo
Copy link
Contributor

When I receive an image on Signal, gurk will show a hyperlink starting in file:///....

Often this link won't fit in a single line, so it gets wrapped. The first line might read something like file:///home/hugo/.local/share/gurk/files/2024-03, and the second line the rest of this link -20/IMG_5383.jpg.

If I try to interact with this link via my terminal, it'll only parse the first line as part of the link (e.g.: file:///home/hugo/.local/share/gurk/files/2024-03). This results in the link not working.

An escape sequence exists to work around this exact issue: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

The escape sequence allows a terminal application to include an uncut URL around portions of the URL that get wrapped.

Implementing this for file:// links would allow interacting with wrapped URLs via a terminal. Anecdotally, senpai(IRC client) uses these for exactly this same purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant