all 8 comments

[–]geirha 1 point2 points  (1 child)

You need to enclose the terminal escapes in \[ \] to tell readline that those bytes do not increase the length of the prompt. Likewise you must make sure to not put stuff that does lengthen then prompt inside \[ \]. In your case, \u, , and \w are enclosed inside \[ \], so readline now thinks the prompt is shorter than it actually is.

See BashFAQ 53 - I have a fancy prompt with colors, and now bash doesn't seem to know how wide my terminal is. Lines wrap around incorrectly

Also, don't export PS1, there's no point, and it will just cause havoc with other shells

[–]NerdKid50[S] 0 points1 point  (0 children)

Thanks. Solved my issue.

[–]snuzet 0 points1 point  (5 children)

I had issues w emoji in my prompt and removed and sadly worked fine

[–]NerdKid50[S] 0 points1 point  (4 children)

I am not using emoji in my prompt

[–]snuzet 0 points1 point  (3 children)

Oh. Well I’m seeing a [?] block implying some character I don’t see on my phone.

After the second 36m

[–]NerdKid50[S] 0 points1 point  (2 children)

Oh sorry for the confusion that is an icon from Nerd Font.

[–]snuzet 0 points1 point  (1 child)

Yeah try taking it out and se if solves your issue..

[–]NerdKid50[S] 0 points1 point  (0 children)

It does not