I want to always save the output of the last command to a file, like ~/.last_command.txt
The answer must be some kind of function that is always called when executing any command.
I've searched high and low for this, but the answers are more geared towards not always saving the output.