From a2fa00d322ddce2a143a45bf7540f61decf420b6 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:18:48 -0500 Subject: [PATCH] fix deactivate with existing PROMPT_COMMAND (#949) --- src/shell/bash.rs | 1 + src/shell/snapshots/rtx__shell__bash__tests__deactivate.snap | 1 + 2 files changed, 2 insertions(+) diff --git a/src/shell/bash.rs b/src/shell/bash.rs index 7ff8529bd1..977f378c0c 100644 --- a/src/shell/bash.rs +++ b/src/shell/bash.rs @@ -52,6 +52,7 @@ impl Shell for Bash { fn deactivate(&self) -> String { formatdoc! {r#" + PROMPT_COMMAND="${{PROMPT_COMMAND//_rtx_hook;/}}" PROMPT_COMMAND="${{PROMPT_COMMAND//_rtx_hook/}}" unset _rtx_hook unset rtx diff --git a/src/shell/snapshots/rtx__shell__bash__tests__deactivate.snap b/src/shell/snapshots/rtx__shell__bash__tests__deactivate.snap index c90483684e..bd78efebb1 100644 --- a/src/shell/snapshots/rtx__shell__bash__tests__deactivate.snap +++ b/src/shell/snapshots/rtx__shell__bash__tests__deactivate.snap @@ -2,6 +2,7 @@ source: src/shell/bash.rs expression: replace_path(&deactivate) --- +PROMPT_COMMAND="${PROMPT_COMMAND//_rtx_hook;/}" PROMPT_COMMAND="${PROMPT_COMMAND//_rtx_hook/}" unset _rtx_hook unset rtx