From dc6138d2869c8a5813ca68f146945f49b77f8a1f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 8 Feb 2022 19:52:02 +0530 Subject: [PATCH] Add a note about why we check _ksi_prompt_command --- shell-integration/bash/kitty.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell-integration/bash/kitty.bash b/shell-integration/bash/kitty.bash index 81ceabc8d..34a88023c 100644 --- a/shell-integration/bash/kitty.bash +++ b/shell-integration/bash/kitty.bash @@ -135,7 +135,9 @@ _ksi_main() { builtin unset _ksi_prompt[end_secondary_mark] # install our prompt command, using an array if it is unset or already an array, - # otherwise append a string + # otherwise append a string. We check if _ksi_prompt_command exists as some shell + # scripts stupidly export PROMPT_COMMAND making it inherited by all programs launched + # from the shell builtin local pc='builtin declare -F _ksi_prompt_command > /dev/null 2> /dev/null && _ksi_prompt_command' if [[ -z "${PROMPT_COMMAND}" ]]; then PROMPT_COMMAND=([0]="$pc")