bash integration: fix newline replace in PS1

This commit is contained in:
Kovid Goyal 2021-10-23 18:48:45 +05:30
parent edd423aad6
commit 899b5078eb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -42,8 +42,8 @@ _ksi_main() {
if [[ "${_ksi_prompt[mark]}" == "y" ]]; then if [[ "${_ksi_prompt[mark]}" == "y" ]]; then
# bash does not redraw the leading lines in a multiline prompt so # bash does not redraw the leading lines in a multiline prompt so
# mark them as secondary prompts # mark them as secondary prompts
local secondary_prompt="\[\e]133;A;k=s\a\]" local secondary_prompt="\n\[\e]133;A;k=s\a\]"
PS1=${PS1//\n/\n"$secondary_prompt"} PS1=${PS1//"\n"/"$secondary_prompt"}
PS1="\[\e]133;A\a\]$PS1" PS1="\[\e]133;A\a\]$PS1"
PS2="\[\e]133;A;k=s\a\]$PS2" PS2="\[\e]133;A;k=s\a\]$PS2"
PS0="\[\e]133;C\a\]$PS0" PS0="\[\e]133;C\a\]$PS0"