From af84161528a00f5a254d7d4da19dc07512d5735c Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Fri, 9 Feb 2024 20:45:40 +0900 Subject: [PATCH] Fix Bash integration removing existing elements of PROMPT_COMMAND --- shell-integration/bash/kitty.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell-integration/bash/kitty.bash b/shell-integration/bash/kitty.bash index ec9584a26..986c7873e 100644 --- a/shell-integration/bash/kitty.bash +++ b/shell-integration/bash/kitty.bash @@ -280,7 +280,7 @@ _ksi_main() { # from the shell builtin local pc pc='builtin declare -F _ksi_prompt_command > /dev/null 2> /dev/null && _ksi_prompt_command' - if [[ -z "${PROMPT_COMMAND}" ]]; then + if [[ -z "${PROMPT_COMMAND[*]}" ]]; then PROMPT_COMMAND=([0]="$pc") elif [[ $(builtin declare -p PROMPT_COMMAND 2> /dev/null) =~ 'declare -a PROMPT_COMMAND' ]]; then PROMPT_COMMAND+=("$pc")