If in .bashrc the following reports the 'history number of the current command' (and the exit code of the last command), how can I configure it to report the 'history number of the previous command'?
PS1='[\u@\h]\!:`echo $?` $ '
Subtracting one from the history number can be done like this:
So that will show the return code of the history entry listed, which makes the prompt look more consistant I imagine.