From a bash script that occupies the full terminal, how do I restore the previous session?
A few programs of which I know they work this way:
- ranger
- vim
- man
- nano
The common pattern is: The program usurps the whole terminal, and then, upon exiting, everything is restored, i.e. entered commands and printed output.