starship / starship

☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
https://starship.rs
ISC License
44.51k stars 1.94k forks source link

Prompt shifted over after shell docker/composer timeout #5045

Open tomjn opened 1 year ago

tomjn commented 1 year ago

Note: this issue prevented starship bug-report from working

Bug Report

Current Behavior

When a docker shell session in a composer command has timed out, the prompt is skewed over like this:

Screenshot 2023-03-31 at 16 17 29

This persists if I try to run commands, clear, or to reload starship.

Running starship also shows all output shifted incorrectly in the help documentation.

Loading a new terminal session in a new tab resolves the problem until I recreate the circumstances that lead to it

Expected Behaviour

For it to not do that and place the second line to the left like this:

Screenshot 2023-03-31 at 16 17 52

Additional context/Screenshots

Screenshot 2023-03-31 at 16 14 10

Possible Solution

¯_(ツ)_/¯

Environment

Relevant Shell Configuration

export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh"  # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion
source "${HOME}/bashosx/init.sh"

eval "$(starship init zsh)"
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"

# bun completions
[ -s "/Users/tomjn/.bun/_bun" ] && source "/Users/tomjn/.bun/_bun"

# Bun
export BUN_INSTALL="/Users/tomjn/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
export PATH="/opt/homebrew/opt/ruby@2.7/bin:$PATH"

Starship Configuration

[nodejs]
symbol="Node "
tomjn commented 1 year ago

Also noting that after this I tried to run starship bug-report and go this:

Screenshot 2023-03-31 at 16 14 38

I could not accept, pressing y, pressing return, esc, cmd+c, etc, there was no way to abort/cancel/escape, or accept/confirm. I had to kill the tab to recover

davidkna commented 1 year ago

Does this issue only happen if starship is enabled?

tomjn commented 1 year ago

Does this issue only happen if starship is enabled?

I retried this with starship commented out in my .zshrc and the problem did not occur in a generic ZSH prompt.

This was after encountering the problem again with starship

tomjn commented 1 year ago

Noting that the spacing is dynamic based on the length of the starship prompt:

Screenshot 2023-04-25 at 19 22 52
mickimnet commented 1 year ago

Could you try it with a different terminal like iTerm?

tomjn commented 1 year ago

Terminal is the only prompt I have, keep in mind that the command I'm using to test this takes at least 30 minutes to run, and the cost of each re-run attempt is enormous. If a shorter cheaper alternative can be found that would make testing easier, but I don't have a lot of bandwidth to keep trying again on random pieces of software