#2276·powerline

Option to allow to output powerline prompt with leading carriage return

Author: stylonCreated May 5, 2025Updated May 5, 2025

After configuring powerline to my needs (only left side) I got annoyed by bash / readline to echo characters to the terminal when executing jobs that take longer. Those characters cause the powerline prompt to append to the characters and not overwrite them. Of course, the characters get repeated by readline after the prompt as expected. A picture showing the issue: Image I would like the powerline prompt to cleanly start at a new terminal line like the first prompt.

An attempt to solve the issue succeeded by prepending a carriage return (\r) to the PS1 within /usr/share/powerline/bindings/bash/powerline.sh:_powerline_set_prompt(), but I would prefer to not hack the source code which in addition affects all users by the way. I also didn't test the hack thoroughly and it may have other side effects that I can't forsee.

Maybe there is already a clean way to configure this, but I missed that? If not, please add an option.