12
3
How might one copy the entire buffer being displayed by less?
No need to select specific text, I want it all.
Copying to the clipboard is preferable but if we can output it to a file that works too.
I've tried using generic vim
commands like :w and the ones listed here but less
doesn't seem to accept commands like that.
EDIT
I must be able to do this from within less
. Let's say that less
is pipe
ed to from an alias, I have no control over how less
is actually called. I am just presented with the result.
I found a way to save the buffer (see my answer below) so now I just need to see if there is any way to select and copy. There probably isn't, given the restrictions.
this must have been what @Neil was trying to tell me
– Hashbrown – 2019-11-24T02:57:51.6631
for other people, as @ahilsend noted
– Hashbrown – 2019-11-24T03:01:25.900xsel -i
is good for the middle-click buffer, but usexsel -ib
if you wanted the paste buffer instead