Added copy (yank) function
Using the pyperclip library, I've added copying of the currently selected line in pointer mode to the system clipboard.
https://textual.textualize.io/api/app/#textual.app.App.copy_to_clipboard
Oops, didn't see that one. Not used Textual before 😃
However, this note in the documentation makes this a non-option for me:
This does not work on macOS Terminal, but will work on most other terminals.
The macOS terminal hasn't been updated in many years. You get a far better experience from iTerm2 or other third party terminal.
Pyperclip won't work over shh, AFAIK, so I couldn't accept that I'm afraid.
Ah, right. I am using iTerm2 but I read the note as "any terminal on MacOS". My bad.
I will update the PR
I've updated the PR branch now.
Ideally, the copy function should be complemented by a multi-line select as I wrote in the comment on #23
I would like to extend the request to copying multiple lines at once. I currently have a stack trace of ~30 lines with several lines wider than my terminal can display. So, for me, copying individual lines is tedious.
Hence, I propose to allow a range of lines to be selected in pointer mode, and a key to copy to the system clipboard. (Similar to the following in vim:
Vjjjthen"+y)