Skip to content

[Bug]: Powerline overwrites output of last command when it doesn't end with newline #2372

@joshiste

Description

@joshiste

Expected behavior

don't overwrite output of the previous command.

Current behavior

The powerline theme always starts in the beginning of the line.

If the last command ended without printing a newline, the output will be overwritten.

Possible solution

I think there would be three possible solutions:
a)don't jump back at all
b)always insert a line break
c)use a PROMPT_COMMAND to insert a newline that inserts a newline if the last command ended without it

Context

No response

Steps to reproduce

run echo -n foo in bash with powerline theme

Diagnostic Information

�[1m�[36mBash-it Doctor Summary�(B�[m
�[36m======================�(B�[m

�[1m## Environment�(B�[m
�[32mOS:�(B�[m Darwin 25.3.0
�[32mBash Version:�(B�[m 5.3.9(1)-release
�[32mBash-it Location:�(B�[m /Users/jedmeier/.dotfiles/.bash_it
�[32mConfig File:�(B�[m /Applications/Ghostty.app/Contents/Resources/ghostty/shell-integration/bash/ghostty.bash

�[1m## Bash-it Version�(B�[m
�[32mCurrent Version:�(B�[m v3.2.0 (0f04edce)
�[33mStatus:�(B�[m 2 commits behind origin/master

Note: Cannot auto-update (uncommitted changes present). Use: bash-it update

�[1m## Bash-it Loading�(B�[m
From /Users/jedmeier/.bash_profile:
9-esac
10-
11:# Path to the bash it configuration
12:export BASH_IT="/Users/jedmeier/.dotfiles/.bash_it"
13-
14-# Lock and Load a custom theme file.
15-# Leave empty to disable theming.
16:# location "$BASH_IT"/themes/
17:export BASH_IT_THEME='powerline'
18-
19-
--
25-
26-# (Advanced): Change this to the name of your remote repo if you
27:# cloned bash-it with a remote other than origin such as `bash-it`.
28:# export BASH_IT_REMOTE='bash-it'
29-
30-# (Advanced): Change this to the name of the main development branch if
31-# you renamed it or if it was changed for some reason
32:# export BASH_IT_DEVELOPMENT_BRANCH='master'
33-
34-# Your place for hosting Git repos. I use this for private repos.
--
45-
46-# Set this to the location of your work or project folders
47:#BASH_IT_PROJECT_PATHS="${HOME}/Projects:/Volumes/work/src"
48-
49-# Set this to false to turn off version control status checking within the prompt for all themes
--
66-# If your theme use command duration, uncomment this to
67-# enable display of last command duration.
68:#export BASH_IT_COMMAND_DURATION=true
69-# You can choose the minimum time in seconds before
70-# command duration is displayed.
--
79-#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
80-
81:# (Advanced): Uncomment this to make Bash-it reload itself automatically
82-# after enabling or disabling aliases, plugins, and completions.
83:# export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1
84-
85:# Uncomment this to make Bash-it create alias reload.
86:# export BASH_IT_RELOAD_LEGACY=1
87-
88:# Load Bash It
89:source $BASH_IT/bash_it.sh
90-
91-# Ensure prompt always starts on a new line (like zsh's PROMPT_SP)

�[1m## Profile Configuration�(B�[m
�[33mNote:�(B�[m /Users/jedmeier/.bash_profile is a symlink to /Users/jedmeier/.dotfiles/.bash_profile
�[32m✓�(B�[m .bashrc is sourced from /Users/jedmeier/.bash_profile

�[1m## Enabled Components�(B�[m
�[36mAliases�(B�[m (4): bash-it directory editor general
�[36mPlugins�(B�[m (3): base powerline sdkman
�[36mCompletions�(B�[m (13): aliases bash-it brew cargo docker git github-cli helm makefile minikube rustup sdkman system

�[33mTip:�(B�[m To copy this report: �[36mbash-it doctor�(B�[m | pbcopy (macOS) or xclip (Linux)



Additional Context (Optional)

No response

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions