Bash has a history function, it would be useful if 'history' would show the exit codes (return codes) from all commands:
For example, showing the RC values in a new column after the history number 4751 0 2023-04-10 04:49:48 cat kernel-vanilla.repo 4752 0 2023-04-10 04:50:30 rm kernel-vanilla.repo 4753 2 2023-04-10 04:50:53 grep baseurl kernel-vanilla.repo 4754 2 2023-04-10 04:50:55 ls -l kernel-vanilla.repo showing non-zero RC codes due to the missing file in the last two. If adding a new column is disruptive (non-standard) this RC column could be optional just like the HISTTIMEFORMAT activates the HISTTIME Mark