Credit to these very helpful Internet sources:
- r/OutOfTheLoop: Where did the "༼ つ ◕_◕ ༽つ" emoticon get started?
- tldp: Bash Prompt HOWTO: ANSI Escape Sequences
- StackOverflow: A.D.'s answer to Custom Bash prompt is overwriting itself
The StackOverflow discussion, in particular, got me over the problem of the cursor position being screwed up (overlapping and overwriting the line) when doing escape sequences. Apparently you have to prepend \[
and append \]
around each escape sequence.
Set this in your ~/.bash_profile
:
export PS1="༼ つ\[\033[31m\](\[\033[5m\]♥\[\033[0m\033[31m\])\[\033[0m\]_♥༽つ \W $ "
\033[31m
- red\033[5m
- blink\033[0m
- reset
Sir I have got weird symbols on Windows machine. Any Idea? So I need powerline font or there some other issue?
Also heart ain't blinking :p