Then you should look at https://atuin.sh/ although I am not certain about exit code.