-
Notifications
You must be signed in to change notification settings - Fork 57
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
Better use of OSC terminal escape codes #1070
Comments
ex OSC 8 ex OSC 52 |
https://pkg.go.dev/github.com/charmbracelet/x/ansi#SetHyperlink OSC 8 support in golang |
iTerm and VSCode terminal both support (on macOS) Command-Click. Not sure what the equivalent would be on Windows/Linux off the top of my head? Testing As for clipboard support that feature already exists. https://synfinatic.github.io/aws-sso-cli/v1.17.0/config/#browser-urlaction-urlexeccommand |
agreed, but the terminal will provide more context about the full url with a hover. Anyone security-conscious should be checking this, anyone who doesn't care already didn't care.
Yes it exists. But in a remote shell (ssh or container etc) this error happens:
There could be a platform agnostic additional url-action, maybe |
as a CLI, there's already the possibility that you're using escape codes to present a URL as something that it isn't, like |
Regarding "Click me"- Yes. I don't deny that could be happening. Just not sure why I would deliberately obfuscate the actual URL the user should click on? I guess I'm having a hard time imaging there are a set of users who don't know what a URL looks like or when shown one, they don't know what to do with it. As for clipboard- ah, now I understand the use case. That makes sense. |
Is your feature request related to a problem? Please describe.
We are using
aws-sso-cli
in codespaces, wherexdg-open
andxsel|xclip
etc are not options. We are looking for ways to make the UX as simple as possible for the end users of this codespaces environment.Describe the solution you'd like
I am requesting options for
url-action
that can either print the URL to a terminal using OSC 8 escape codes, or copy into clipboard using OSC 52 escape codes. These are both supported by VSCode's integrated terminal, as well as kitty terminal. Not sure about others.As mentioned,
xsel|xclip
are not available, so copy to clipboard doesn't work at all over a codespaces/remote connection, but print to terminal obviously works, OSC 8 just gives the opportunity to improve the formatting of these links.I wish there was an escape code for opening a link in the user's default browser, but I don't see one.
The text was updated successfully, but these errors were encountered: