Actually, what you ask for already exists: !LastCommandOK
(It is deprecated but still works).
See here: What's the difference between !statusOK and !LASTCOMMANDOK? - #2 by ulrich
Actually, what you ask for already exists: !LastCommandOK
(It is deprecated but still works).
See here: What's the difference between !statusOK and !LASTCOMMANDOK? - #2 by ulrich