2015-04-24 OS X
One of the reasons why I felt in love with Macs and OS X is the combination of interface beauty and power of Unix. Although I do like Debian and Ubuntu in terms of doing my development stuff, both systems are extremely ugly and don’t give much visual pleasure. But let’s focus on OS X.
If you work for most of your time in Terminal, it would be nice to customize the prompt to suit your needs. In this article I will demonstrate how to customize your prompt and convert it into a fancy one. It’s going to be fun since we’ll deal with some Emoji icons.
and then Terminal to open it.
Prompt can contain your custom text as well as some defined values assigned to particular letters preceded by a backslash sign.
I assume that you use Bash. Go to your home directory
and open .bash_profile in an editor you preffer
Are you curious how the hell I inserted those icons? ;) It’s extremely easy. Take a look.
From the Menu Bar go to Edit and click on Emoji & Symbols.
Feel free to put any icon(s) you want. I like green color so I had to put some plants and palm trees. ;)
Here’s the syntax to export PS1 (Prompt String 1)
export PS1=" "
Anything between quotation marks is your content.
export PS1="[\t] (emoji) (emoji) \n[Hi \u!] (emoji) (emoji) (emoji) (emoji) (emoji) \w (emoji) "