Skip to content

Commit 95fb5fe

Browse files
committed
Preserve return value in the case where iterm2_ran_preexec is false. Issue 10979
1 parent aeff23f commit 95fb5fe

File tree

1 file changed

+1
-0
lines changed
  • shell_integration

1 file changed

+1
-0
lines changed

shell_integration/bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ function __iterm2_prompt_command () {
564564
then
565565
# This code path is taken when you press ^C while entering a command.
566566
# I observed this behavior in CentOS 7.2 and macOS "GNU bash, version 5.0.18(1)-release".
567+
( exit $__iterm2_last_ret_value )
567568
__iterm2_preexec ""
568569
__bp_set_ret_value "$__iterm2_last_ret_value" "$__bp_last_argument_prev_command"
569570
fi

0 commit comments

Comments
 (0)