[Feature Request] remember previous piped input buffers, automatically
Sometimes when less is used with piped input, especially when the input data is generated by some heavy lifting commands, it would be nice if less can automatically cache the input buffer, so that one can get it back when the data needs to be inspected again.
This can be an opt-in feature so that only enabled when configured, and when less is executed without any input, it can automatically bring back the most recent buffer, or maybe with an argument specifying which buffer to restore.
Can you clarify this? Less already buffers all input data (unless -B is used), and you can inspect it again by just jumping or scrolling to it. Or are you referring to saving the entire input file between sessions? You can do that with the "s" command, are you asking something different?
I'm looking for something like the automated, or more streamlined version of the s command.
so whenever the input is from pipe, the buffer is automatically saved, to some predefined location.
Couldn't this be done with a simple frontend script, something like this?
tee ~/lessdata/$(date +%s) | less $*
tee ~/lessdata/$(date +%s) | less $*
I've adopted this and it actually works very well, thank you!