Keep a reference to last execution result on the shell....
Keep a reference to last execution result on the shell.
In particular to know if the last command has failed.
Note:
Cannot keep a handle on the result object, or it does not get garbage
collected until end of next run, which break some assumption about when
__del__ is called.