From 3a0c08cadabfab76edcbfc6360a5276c39305ac6 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Thu, 3 Oct 2024 06:56:15 -0700 Subject: [PATCH] Return the exit code to ensure other prompt_commands work with hishtory, see #247 --- client/lib/config.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/lib/config.sh b/client/lib/config.sh index c520c3e..b3c331b 100644 --- a/client/lib/config.sh +++ b/client/lib/config.sh @@ -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