mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +03:00
bash: ghostty doesn't support OSC 133;P
Remove OSC 133;P marks in the basic prompts, and use OSC 133;A in the multiline case.
This commit is contained in:
@ -98,8 +98,8 @@ function __ghostty_precmd() {
|
|||||||
_GHOSTTY_SAVE_PS2="$PS2"
|
_GHOSTTY_SAVE_PS2="$PS2"
|
||||||
|
|
||||||
# Marks
|
# Marks
|
||||||
PS1='\[\e]133;P;k=i\a\]'$PS1'\[\e]133;B\a\]'
|
PS1=$PS1'\[\e]133;B\a\]'
|
||||||
PS2='\[\e]133;P;k=s\a\]'$PS2'\[\e]133;B\a\]'
|
PS2=$PS2'\[\e]133;B\a\]'
|
||||||
|
|
||||||
if [[ "${PS1}" == *"\n"* || "${PS1}" == *$'\n'* ]]; then
|
if [[ "${PS1}" == *"\n"* || "${PS1}" == *$'\n'* ]]; then
|
||||||
# bash doesn't redraw the leading lines in a multiline prompt so
|
# bash doesn't redraw the leading lines in a multiline prompt so
|
||||||
@ -108,7 +108,7 @@ function __ghostty_precmd() {
|
|||||||
builtin local oldval
|
builtin local oldval
|
||||||
oldval=$(builtin shopt -p extglob)
|
oldval=$(builtin shopt -p extglob)
|
||||||
builtin shopt -s extglob
|
builtin shopt -s extglob
|
||||||
PS1=${PS1%@('\n'|$'\n')*}'\n\[\e]133;P;k=s\a\]'${PS1##*@('\n'|$'\n')}
|
PS1=${PS1%@('\n'|$'\n')*}'\n\[\e]133;A;k=s\a\]'${PS1##*@('\n'|$'\n')}
|
||||||
builtin eval "$oldval"
|
builtin eval "$oldval"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user