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
Adding bindings to yank the current URL and the selected URL #225
Adding bindings to yank the current URL and the selected URL #225
Conversation
…ding to yank the currently selected target URL.
I guess you should add |
Thanks @singalhimanshu. Now added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for creating this PR! See my comments below.
Sorry I didn't mention this in #220, but I using URL is better than URI, and that using the word copy is better than yank. I would recommend these two names in the config:
bind_copy_page_url
bind_copy_highlight_url
Get rid of the addToClipboard
function, and instead call clipboard.WriteAll
directly. Capture the error, and
…yank' to 'copy', plus a bit of general tidy up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating! See my comments below.
…ndling the 'nothing selected' case.
Looks great! I tested and it all works fine. Thanks! |
Many thanks for the excellent support regarding where to make the changes - and for developing a code base that allowed me to get something working with so little difficulty. :-)
I used the following clipboard library https://pkg.go.dev/github.com/atotto/clipboard?utm_source=godoc ... I don't think it needs cgo, although it does depend on xsel or xclip (and their equivalents on Windows and Mac OS). Hopefully that fits with what you were thinking.
Issue #220