Skip to content

Conversation

@anorm
Copy link

@anorm anorm commented Oct 25, 2024

Using the pyperclip library, I've added copying of the currently selected line in pointer mode to the system clipboard.

@anorm anorm mentioned this pull request Oct 25, 2024
@anorm
Copy link
Author

anorm commented Oct 25, 2024

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.

@willmcgugan
Copy link
Member

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.

@anorm
Copy link
Author

anorm commented Oct 25, 2024

Ah, right. I am using iTerm2 but I read the note as "any terminal on MacOS". My bad.

I will update the PR

@anorm anorm force-pushed the feature/yank-line branch from 1d7b0cb to 18e6242 Compare October 25, 2024 17:20
@anorm
Copy link
Author

anorm commented Oct 25, 2024

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: Vjjj then "+y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants