toolong icon indicating copy to clipboard operation
toolong copied to clipboard

Copying out of tl

Open kyrrigle opened this issue 1 year ago • 11 comments

I could see tl being super helpful but there's one thing missing that means I cannot use it for real.

Often the end result of searching for something in the logs is to copy the information out (share with coworker, create jira, etc)

It seems like there's no current way to do that?

Double clicking on a log line opens the detail. Trying to click-drag select in detail does noting. Ctrl-C does nothing.

If Ctrl-C could copy the current line that would be good enough but I would love to be able to copy all lines found by selection. And being able to click-drag in the detail to select part of the json would be nice.

kyrrigle avatar Feb 13 '24 13:02 kyrrigle

I meant "Command-C" to copy (Ctrl-C exits of course). Maybe an function key to copy?

kyrrigle avatar Feb 13 '24 13:02 kyrrigle

I agree that this would be very usefull

With gnome-terminal you can use CTRL+SHIFT+LMB to do a block select that way you can select the text from the detail view.

It will introduce line breaks though

mmoerdijk avatar Feb 16 '24 06:02 mmoerdijk

Agreed that the ability to select/copy would be absolutely needed

adrfantini avatar Feb 19 '24 08:02 adrfantini

On macOS you can select text with the mouse while holding the Option key, then copy with CMD-C.

rhuygen avatar Mar 08 '24 13:03 rhuygen

Same problem here. I can't figure out any way to copy text from the terminal when using this...

it looks great, but not being able to copy a specific bit of log file to the clipboard is a major dealbreaker.

note: i'm using xfce4-terminal w/ zsh on xubuntu 23.10

spaceman7777 avatar Mar 26 '24 12:03 spaceman7777

I didn't find a way to make it work in Ubuntu either....

rhuygen avatar Mar 26 '24 12:03 rhuygen

Yes copying line/block of lines would be very helpful :) I am on Ubuntu too

Stubatiger avatar May 23 '24 11:05 Stubatiger

+1 for a copy function - I'm on Ubuntu under Windows (WSL).

cornel-masson avatar Jul 24 '24 11:07 cornel-masson

+1. awsome tool so far but this would be a great addition

gergo avatar Sep 03 '24 10:09 gergo

+1

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)

anorm avatar Oct 25 '24 12:10 anorm

I've created a pull request #62 which adds the single line copy function. Can be tested by installing from my branch:

pip install git+https://github.com/anorm/toolong.git@feature/yank-line

anorm avatar Oct 25 '24 16:10 anorm