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

select/copy/find during --pager? #53

Closed
mlibbey opened this issue May 18, 2022 · 7 comments
Closed

select/copy/find during --pager? #53

mlibbey opened this issue May 18, 2022 · 7 comments

Comments

@mlibbey
Copy link

mlibbey commented May 18, 2022

I've been trying rich --pager as a less pager replacement. I've realized that I can't select words while in that mode, which prevents copy. Is there a way to allow selecting of words? (and ideally some sort of find?)

@willmcgugan
Copy link
Collaborator

Hold down Command or Ctrl.

Re find, we might implement that in the future.

@davidfokkema
Copy link

This does not seem to work on iTerm2 version 3.4.16 with rich-cli version 1.8.0. Holding down Cmd will highlight things that iTerm seem to think are http links, but selection is not possible. Ctrl-mouse click will immediately bring up a menu. Am I holding it wrong?

@willmcgugan
Copy link
Collaborator

Try option

@davidfokkema
Copy link

That works, thanks! How... could I have known this? Is this documented somewhere or would it be possible to just allow selecting text without holding the option key?

@willmcgugan
Copy link
Collaborator

It’s not something Textual can control. It’s a feature of you terminal.

@davidfokkema
Copy link

Ah, I see. I never encountered this before (vim, less, top work fine) but I guess it has to do with Textual being able to respond to mouse events. According to the iTerm2 docs, holding down Option disables mouse reporting and is needed for some applications. Learned something today, thanks! If I'm not the only one, maybe add a 'gotcha' to the rich-cli/textual docs? 😇

@harkabeeparolus
Copy link

[...] I guess it has to do with Textual being able to respond to mouse events. According to the iTerm2 docs, holding down Option disables mouse reporting and is needed for some applications.

This is correct. Terminal applications with mouse support in terminals catch mouse events such as click and drag, that you'd normally use to select text. It's been this way for decades. This can be really annoying if you're uninterested in clicking buttons and just want to copy text, but most terminals do have some way around it. 😊

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

No branches or pull requests

4 participants