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 and copy text in logs #167

Open
angrykoala opened this issue Sep 9, 2019 · 4 comments
Open

Select and copy text in logs #167

angrykoala opened this issue Sep 9, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@angrykoala
Copy link

angrykoala commented Sep 9, 2019

Is your feature request related to a problem? Please describe.
I'm not able to select or copy the output of docker logs

Describe the solution you'd like
I would like to be able to select text in logs and copy them using the context menu of the mouse, similar as when I execute docker-compose logs

Additional context
I've tried this both on the default ubuntu terminal and guake (in ubuntu) with lazydocker v0.7.4

@angrykoala angrykoala added the enhancement New feature or request label Sep 9, 2019
@dawidd6
Copy link
Collaborator

dawidd6 commented Sep 9, 2019

I don't think it's doable with gocui. Disabling mouse events and trying to select text in logs, it just selects every single character that is currently on terminal, even frames which is not desirable.

The only way to copy logs cleanly for now I guess is:

  1. Press m to attach to container
  2. Copy logs
  3. Return to lazydocker by pressing ctrl-c

@jesseduffield
Copy link
Owner

jesseduffield commented Sep 14, 2019

@angrykoala I am able to copy text from lazydocker by holding option and command (I'm on a mac) and dragging over the area I want to copy. It only allows for selecting a rectangle of characters because it's not possible to scope the drag to just the main panel, but it gets the job done. Perhaps that would solve your issue?

@angrykoala
Copy link
Author

@jesseduffield It is a reasonable workaround but not ideal, for copying it's still better just accessing the logs directly

@Tendrid
Copy link

Tendrid commented Feb 21, 2023

Obvious, buy I'm leaving it here in case it helps:
For Linux users on PC, CTRL + Shift works just like @jesseduffield mentioned.

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

No branches or pull requests

4 participants