see maybe the debug trap
On Tue, Jan 11, 2022, 16:12 Tathastu Pandya via Bug reports for the GNU
Bourne Again SHell <bug-bash@gnu.org> wrote:
> Just as PROMPT COMMAND thats get executed every time before any commamd.
> Is there a way to execute predefined command after every command is
> executedeg. Automatically record the exit status of currentky executed
> command to history file immeduately after a command ends or ctrl+c or any
> break or exit
>
> Sent from Yahoo Mail on Android
>