Is it possible to, somehow, access xterm's scrollback buffer as a (read-only) file or a character device?
The core issue (to avoid x/y "problemming"), is this: sometimes the command I've just executed creates non-deterministic output, and I'd like to use its output somehow without pre-thought of tee-ing it. Right now, the only way to do this (that I'm aware of) is to use the mouse to select the text into primary selection.
tee. Have you considered runningscriptto create a log of all your commands to a file? – Stephen Quan Apr 30 '18 at 00:16