Skip to content
Discussion options

You must be logged in to vote

It's your Bash prompt that's causing this. You must wrap the escape sequences in \[ and \] like this:

PS1="\[\e[31m\]#\[\e[0m\] "

See https://www.gnu.org/software/bash/manual/bash.html#Controlling-the-Prompt

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@balupton
Comment options

Answer selected by balupton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-confirmation A reproduction has been reported, but the bug hasn't been confirmed or reproduced by a maintainer.
2 participants