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

Add keybind action copy_url_to_clipboard #4633

Closed
mitchellh opened this issue Jan 5, 2025 · 3 comments · Fixed by #4676
Closed

Add keybind action copy_url_to_clipboard #4633

mitchellh opened this issue Jan 5, 2025 · 3 comments · Fixed by #4676
Milestone

Comments

@mitchellh
Copy link
Contributor

Discussion: #4616

We should introduce a new keybind action copy_url_to_clipboard that copies the URL below the mouse to the clipboard. This should work with both normal detection and OSC8.

With the new performable: binding prefix, its easy to make this only have an affect while there is a link present.

@AlexJuca
Copy link
Contributor

AlexJuca commented Jan 5, 2025

@mitchellh Where do existing key bind actions live?

Also, what do you mean by: "it should work both for normal detection and OSC8"?

Additionally, Would I be correct to assume that this can all be done without touching the native parts of Ghostty?

@mitchellh
Copy link
Contributor Author

@mitchellh Where do existing key bind actions live?

src/input/Binding.zig

Also, what do you mean by: "it should work both for normal detection and OSC8"?

Regex-matched and esc-seq created links. Basically, all link types supported by Ghostty.

Additionally, Would I be correct to assume that this can all be done without touching the native parts of Ghostty?

Yes, I believe so.

@AlexJuca
Copy link
Contributor

AlexJuca commented Jan 6, 2025

@mitchellh Here is an MR that correctly implements the required functionality.

#4678

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