Scott Watermasysk Husband, Father, Bootstrapper, Developer, Builder, Shipper.

πŸ˜€ Emoji Prompt

In my shell prompt, I typically keep things very simple. Just the current folder I am in and the git branch.

iTerm 3.3 introduced a new customizable status bar. In this new status bar, you can easily view your things like your current directory as well as your current git branch. This means I can further simplify my prompt to…well, nothing really.

With this new real estate I figured I could have a bit of fun and wrote this small shell script which adds an Emoji based on the day of the week.

local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"

get_emoji_based_on_day() {
  case $(LC_ALL=-C date +%u) in
    (1) echo πŸ‘‰;;
    (2) echo πŸ‘;;
    (3) echo ✊;;
    (4) echo πŸ€™;;
    (5) echo 🍺;;
    (6) echo πŸŽ‰;;
    (7) echo πŸ™;;
    (*) echo 🀯;;

PROMPT='$(get_emoji_based_on_day) ${ret_status}%{$reset_color%}'

Another great new iTerm 3.3 feature is a minimal theme option which simplifies the entire screen. Here is what it all looks like:

iTerm 3.3 with Emoji Prompt Preview

Hat Tip This prompt is based on Robby Russel default theme in OH My ZSH.