Shell integration: Better fix for multi-line prompts in bash
Also fix bash redrawing only the last PS2 prompt
This commit is contained in:
parent
18aca275c8
commit
0f9944190d
@ -40,7 +40,12 @@ _ksi_main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${_ksi_prompt[mark]}" == "y" ]]; then
|
if [[ "${_ksi_prompt[mark]}" == "y" ]]; then
|
||||||
PS1="\[\e]133;A;does_not_redraw_multiline_prompt\a\]$PS1"
|
# bash does not redraw the leading lines in a multiline prompt so
|
||||||
|
# mark them as secondary prompts
|
||||||
|
local secondary_prompt="\[\e]133;A;k=s\a\]"
|
||||||
|
PS1=${PS1//\n/\n"$secondary_prompt"}
|
||||||
|
PS1="\[\e]133;A\a\]$PS1"
|
||||||
|
PS2="\[\e]133;A;k=s\a\]$PS2"
|
||||||
PS0="\[\e]133;C\a\]$PS0"
|
PS0="\[\e]133;C\a\]$PS0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user