mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Bash integration: Handle existing PROMPT_COMMAND ending with a literal newline
This commit is contained in:
parent
5c03a52a0b
commit
5641668bc1
2 changed files with 3 additions and 1 deletions
|
|
@ -251,7 +251,7 @@ _ksi_main() {
|
|||
elif [[ $(builtin declare -p PROMPT_COMMAND 2> /dev/null) =~ 'declare -a PROMPT_COMMAND' ]]; then
|
||||
PROMPT_COMMAND+=("$pc")
|
||||
else
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND%% }"
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND%%[[:space:]]}"
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND%%;}"
|
||||
PROMPT_COMMAND+="; $pc"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue