shell-integration causes prompt to disappear when resizing #8817
Replies: 2 comments
-
|
I didn't originally see the
|
Beta Was this translation helpful? Give feedback.
-
|
I've also seen the same problem. My 2-line bash prompt loses the first line when resizing ghostty. Is there a reason this issue is not in the "open" state? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
When
shell-integrationis enabled (default), when thebashshell is used, whenPS1contains a dynamically generated prompt that consists of more than one line, resizing the Ghostty window causes all but the last line of the prompt to disappear.As a workaround, I've set
shell-integration = noneto disable it. Fortunately ghostty's cwd reporting turns out to be compatible with that of gnome-terminal, so I can reuse my custom PROMPT_COMMAND function to make that work again.Expected Behavior
All prompt lines produced by
PS1should remain visible.Or, it should be possible to disable the 'prompt redraw' part of shell-integration without losing the 'cwd reporting' feature. (Though in this case I've made cwd reporting work by reusing the code I already had for gnome-terminal.)
Actual Behavior
All prompt lines, except for the last one, become blank.
Reproduction Steps
Open Ghostty.
Run
declare -p PROMPT_COMMANDto make sure that the__bp_*"bash preexec" stuff that Ghostty injects is present.Set PS1 to call a function to dynamically generate the prompt. For example:
(Single quotes are deliberate. Bash will process the
$(...)expansion every time the prompt is shown.)The prompt should look like:
Resize the window.
The prompt now looks like:
that is, the initial lines of the last prompt have disappeared.
Ghostty Logs
Ghostty Version
OS Version Information
Arch Linux
(Linux only) Display Server
Wayland
(Linux only) Desktop Environment/Window Manager
GNOME 49
Minimal Ghostty Configuration
Additional Relevant Configuration
No response
I acknowledge that:
```) on separate lines.Beta Was this translation helpful? Give feedback.
All reactions