1

So I have declared as PS1="\[\W \u\e[0;31m\] ❤ \e[0m\] " in my ~/.profile file. At the start my terminal look like this ~ mihkel ❤ - what is the desired output. But when I'm going back in historly with up arrow it collapses in : ~ mihll should show ~ mihkel ❤ ll I've tried few other versions - of PS1 without spaces etc - but still something like this happens.

Anyone know what's the issue?

Mihkel L.
  • 113

1 Answers1

2

Try this:

PS1="\W \u \[\e[00;31m\] ❤ \[\e[00m\] "
JanS
  • 76
  • 1
    This is the same problem, and the same cause, as at http://superuser.com/a/860538/38062 and http://superuser.com/a/695350/38062 . – JdeBP Dec 21 '15 at 15:10