Shell integration: bash: Fix rendering of multiline prompts with more than two lines
Fixes #4681
This commit is contained in:
parent
728eceb620
commit
9bfa4553a8
@ -115,6 +115,8 @@ Detailed list of changes
|
||||
|
||||
- Shell integration: bash: Dont fail if an existing PROMPT_COMMAND ends with a semi-colon (:iss:`4645`)
|
||||
|
||||
- Shell integration: bash: Fix rendering of multiline prompts with more than two lines (:iss:`4681`)
|
||||
|
||||
- Linux: Fix fontconfig alias not being used if the aliased font is dual spaced instead of monospaced (:iss:`4649`)
|
||||
|
||||
- macOS: Add an option :opt:`macos_menubar_title_max_length` to control the max length of the window title displayed in the global menubar (:iss:`2132`)
|
||||
|
||||
@ -54,9 +54,13 @@ _ksi_main() {
|
||||
PS1="${_ksi_prompt[ps1]}$PS1"
|
||||
if [[ "${_ksi_prompt[mark]}" == "y" ]]; then
|
||||
# bash does not redraw the leading lines in a multiline prompt so
|
||||
# mark them as secondary prompts
|
||||
# mark the last line as a secondary prompt. Otherwise on resize the
|
||||
# lines before the last line will be erased by kitty.
|
||||
PS1=${PS1//\\\[\\e\]133;k;start_secondary_kitty\\a\\\]*end_secondary_kitty\\a\\\]}
|
||||
PS1=${PS1//"\n"/${_ksi_prompt[secondary_prompt]}}
|
||||
# the first part removes everything from the last \n onwards
|
||||
# the second part appends a newline with the secondary marking
|
||||
# the third part appends everything after the last newline
|
||||
PS1=${PS1%'\n'*}${_ksi_prompt[secondary_prompt]}${PS1##*'\n'}
|
||||
fi
|
||||
fi
|
||||
if [[ -n "${_ksi_prompt[ps1_suffix]}" ]]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user