diff --git a/Resources/shell-integration/cmux-bash-integration.bash b/Resources/shell-integration/cmux-bash-integration.bash index 4576212c..1cfd1919 100644 --- a/Resources/shell-integration/cmux-bash-integration.bash +++ b/Resources/shell-integration/cmux-bash-integration.bash @@ -62,7 +62,7 @@ _cmux_report_tty_once() { _CMUX_TTY_REPORTED=1 { _cmux_send "report_tty $_CMUX_TTY_NAME --tab=$CMUX_TAB_ID --panel=$CMUX_PANEL_ID" - } >/dev/null 2>&1 & + } >/dev/null 2>&1 & disown } _cmux_ports_kick() { @@ -74,7 +74,7 @@ _cmux_ports_kick() { _CMUX_PORTS_LAST_RUN=$SECONDS { _cmux_send "ports_kick --tab=$CMUX_TAB_ID --panel=$CMUX_PANEL_ID" - } >/dev/null 2>&1 & + } >/dev/null 2>&1 & disown } _cmux_prompt_command() { @@ -82,11 +82,6 @@ _cmux_prompt_command() { [[ -n "$CMUX_TAB_ID" ]] || return 0 [[ -n "$CMUX_PANEL_ID" ]] || return 0 - # Suppress bash job-done notifications for background tasks spawned below. - # Without this, every completed async probe prints "[N] Done ..." to the terminal. - local _cmux_old_monitor="${-//[^m]/}" - set +m - local now=$SECONDS local pwd="$PWD" @@ -128,7 +123,7 @@ _cmux_prompt_command() { { local qpwd="${pwd//\"/\\\"}" _cmux_send "report_pwd \"${qpwd}\" --tab=$CMUX_TAB_ID --panel=$CMUX_PANEL_ID" - } >/dev/null 2>&1 & + } >/dev/null 2>&1 & disown fi # Git branch/dirty can change without a directory change (e.g. `git checkout`), @@ -159,6 +154,7 @@ _cmux_prompt_command() { fi } >/dev/null 2>&1 & _CMUX_GIT_JOB_PID=$! + disown _CMUX_GIT_JOB_STARTED_AT=$now fi @@ -202,6 +198,7 @@ _cmux_prompt_command() { fi } >/dev/null 2>&1 & _CMUX_PR_JOB_PID=$! + disown _CMUX_PR_JOB_STARTED_AT=$now fi fi @@ -211,8 +208,6 @@ _cmux_prompt_command() { _cmux_ports_kick fi - # Restore job control if it was previously enabled. - [[ -n "$_cmux_old_monitor" ]] && set -m } _cmux_install_prompt_command() {