Skip to content

Commit

Permalink
Return the exit code to ensure other prompt_commands work with hishto…
Browse files Browse the repository at this point in the history
…ry, see #247
  • Loading branch information
ddworken committed Oct 3, 2024
1 parent 1c33189 commit 3a0c08c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/lib/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3a0c08c

Please sign in to comment.