30

I'd like to copy the current link to the system's clipboard or write it to a file.

If it isn't possible, I guess I'd have to settle with opening it in an external browser (which I was avoiding in the first place, thus using Lynx), and then copying the opened URL. :-/

4 Answers4

32

Press Shift+g to show the address of the current document, Shift+e to show the address of the selected link. You can copy the text with your mouse (or the keyboard, if your terminal supports that).

Press a to save the address of a document or link to a (Netscape-alike) bookmark file, by default ~/lynx_bookmarks.html. You can open this in a different browser, it's just HTML.

daxim
  • 1,357
2

Sorry I am a bit late to this post, but I just saw this question. You can use the EXTERN_PAGE (default: ,) or EXTERN_LINK (default: .) keys to do what you want with the page url or selected url respectively. In the config you will also have to include something like EXTERNAL:http:echo %s | xclip -selection clip-board:TRUE into your config if using xorg to define a copy command. Of course, you can also use this for other commands like EXTERNAL:http:mpv %s:TRUE if you want to watch something directly.

I hope this helps anyone searching this thread.

1

Apparently, you can also use Ctrl + S to save the URL of the current page or the current link (at least on my version 2.8.8).

(Unfortunately, I'm currently getting an error "Copy to clipboard failed", but maybe someone else is more lucky.)

0

A simpler one-key solution is = which displays Document Info and where you may also right-click to copy link.

J Michael
  • 413