Skip to content

Conversation

@zedinosaur
Copy link

Per the specification described in https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda, add hyperlink support to mosh.

Closes #1245

Per the specification described in https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda,
add hyperlink support to mosh.

Closes mobile-shell#1245
@achernya
Copy link
Collaborator

For us to consider merging this it needs to have test coverage.

@zedinosaur
Copy link
Author

That's a fair cop. I didn't immediately find the test suite but now I have I will take a crack at it.

@zedinosaur
Copy link
Author

Good catch. I'm rethinking the way the params are parsed and they should all be technically preserved, not just id.

Just store the params unparsed since we don't explicitly need the
id.
@zedinosaur
Copy link
Author

PTAL, there's a test now and I reworked the param parsing.

@zedinosaur
Copy link
Author

Please let me know if there's any further issue. I'd like to take a stab at adding OSC7 support as well since it seems straightforward compared to this, but would like to see this merged first.

@eminence
Copy link
Member

eminence commented Dec 9, 2025

I did a quick test and review and it seems to work as advertised, but I'll do some more real-world testing over the next few weeks

@eminence
Copy link
Member

I'm doing some testing with ripgrep, which has support for OSC 8 hyperlinks. In particular there's a special "vscode" mode that causes some problems.

echo test > test
rg test -g test --hyperlink-format=vscode --color=always

In my terminal, it looks right:

image

But when I clear my terminal, I see some underlines left over:

image

This doesn't happen outside of mosh.

You can also test with this:

printf "\e]8;;vscode://file/home/achin/test:1:1\e\x5c\e[0m\e[35mtest\e[0m\e]8;;\e\x5c:\e[0m\e[1m\e[31mtest\e[0m\n"

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

Successfully merging this pull request may close these issues.

Add support for OSC 8 sequences (hyperlinks)

3 participants