Ah yes, the classic `rm --undo` saved me so many times. No, command-line interfaces rarely offer undo. The onus is on the user to not do irreversible things when they may need to be reversed.
Git, coincidentally, does have something equivalent to undo history: the reflog.
Git, coincidentally, does have something equivalent to undo history: the reflog.