Skip to content

Instantly share code, notes, and snippets.

@Doerge
Last active September 22, 2015 07:57
Show Gist options
  • Save Doerge/02cb0e4d572f9b0f0cd8 to your computer and use it in GitHub Desktop.
Save Doerge/02cb0e4d572f9b0f0cd8 to your computer and use it in GitHub Desktop.

Why So Serious?

On Mac OS X (and possibly other systems) you can brighten up your terminal prompt with emojii's like this: ![Image of Yaktocat] (https://gist.githubusercontent.com/Doerge/02cb0e4d572f9b0f0cd8/raw/showcase.png)

To do this, you should modify the special shell variable PS1 in ~/.profile (or in another config file of your choosing). Put the following snippets on unique lines in that file.

You can either put a single emojii in you prompt, which will always show up when you open a new terminal:

export PS1="\\h:\\wπŸ”:"

or randomly select one from a list, just like the image above:

emojii=('πŸ”' '🍰' 'πŸŽ‚' '🍌' '🍭' 'πŸ’' 'πŸ‘Ύ' 'πŸ—' 'πŸͺ' '🍫' '🍩' 'β›΅' 'πŸš€' '🐳' '🐠' '🐸' '🐚' '🌴' 'πŸ™')
export PS1="\\w${emojii[$RANDOM % ${#emojii[@]} ]}  "

You can pick different emojii's by going to Edit/Special Characters/Emojii in most editors.

To top it off I recommend google'ing the PS1 variable to customize the prompt to your liking!

Sources:

  • Some-guy-on-the-Internet-once-showed the single emojii-thing. (Source wanted!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment