1

This question already has an answer here:

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?

marked as duplicate by Gilles bash Dec 22 '15 at 0:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

Try this:

PS1="\W \u \[\e[00;31m\] ❤ \[\e[00m\] "

Not the answer you're looking for? Browse other questions tagged or ask your own question.