Return the exit code to ensure other prompt_commands work with hishtory, see #247

This commit is contained in:
David Dworken 2024-10-03 06:56:15 -07:00
parent 1c33189f38
commit 3a0c08cada
No known key found for this signature in database

View File

@ -46,7 +46,7 @@ function __hishtory_postcommand() {
if [ -n "${HISHTORY_FIRST_PROMPT:-}" ]; then
unset HISHTORY_FIRST_PROMPT
return
return $EXIT_CODE
fi
# Run after every prompt
@ -57,6 +57,8 @@ function __hishtory_postcommand() {
LAST_SAVED_COMMAND=$CMD
(hishtory updateLocalDbFromRemote &)
return $EXIT_CODE
}
PROMPT_COMMAND="__hishtory_postcommand; $PROMPT_COMMAND"
export HISTTIMEFORMAT=$HISTTIMEFORMAT