Skip to content

Instantly share code, notes, and snippets.

@jsahlen
Created August 8, 2016 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsahlen/b9adfea5554f077c33ddf2d271f5df60 to your computer and use it in GitHub Desktop.
Save jsahlen/b9adfea5554f077c33ddf2d271f5df60 to your computer and use it in GitHub Desktop.
# Decide prompt color based on host name:
PROMPTCOLOR=$fg_bold[cyan] # Default
case `hostname -s | tr '[:upper:]' '[:lower:]'` in
skoodge) PROMPTCOLOR=$fg_bold[red] ;;
tallest) PROMPTCOLOR=$fg_bold[red] ;;
minimoose) PROMPTCOLOR=$fg_bold[magenta] ;;
mortos) PROMPTCOLOR=$fg_bold[green] ;;
lemongrab) PROMPTCOLOR=$fg_bold[yellow] ;;
esac
PROMPTCHAR=$([[ $(whoami) == "root" ]] && echo "#" || echo "➜")
PROMPT='%{$PROMPTCOLOR%}%p%~ $PROMPTCHAR %{$reset_color%}'
RPROMPT='$(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX=" %{\e[38;5;8m%} "
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{\e[38;5;9m%} ✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=" ✔"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment