Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Shell integration: bash: Dont fail if an existing PROMPT_COMMAND ends…
… with a semi-colon

Fixes #4645
  • Loading branch information
kovidgoyal committed Feb 6, 2022
1 parent dddff91 commit f9d9fe6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/changelog.rst
Expand Up @@ -105,6 +105,8 @@ Detailed list of changes
- Linux: Fix rendering of emoji when using scalable fonts such as Segoe UI Emoji
- Shell integration: bash: Dont fail if an existing PROMPT_COMMAND ends with a semi-colon (:iss:`4645`)
0.24.2 [2022-02-03]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 2 additions & 0 deletions shell-integration/bash/kitty.bash
Expand Up @@ -141,6 +141,8 @@ _ksi_main() {
elif [[ $(builtin declare -p PROMPT_COMMAND 2> /dev/null) =~ 'declare -a PROMPT_COMMAND' ]]; then
PROMPT_COMMAND+=("_ksi_prompt_command")
else
PROMPT_COMMAND="${PROMPT_COMMAND%% }"
PROMPT_COMMAND="${PROMPT_COMMAND%%;}"
PROMPT_COMMAND+="; _ksi_prompt_command"
fi
}
Expand Down

0 comments on commit f9d9fe6

Please sign in to comment.