Skip to content

Instantly share code, notes, and snippets.

@andrey-utkin
Created March 5, 2016 07:52
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 andrey-utkin/c5c2bccfe7d5be2178a1 to your computer and use it in GitHub Desktop.
Save andrey-utkin/c5c2bccfe7d5be2178a1 to your computer and use it in GitHub Desktop.
WHITE='\[\033[1;37m\]'
LIGHTGRAY='\[\033[0;37m\]'
GRAY='\[\033[1;30m\]'
BLACK='\[\033[0;30m\]'
RED='\[\033[0;31m\]'
LIGHTRED='\[\033[1;31m\]'
GREEN='\[\033[0;32m\]'
LIGHTGREEN='\[\033[1;32m\]'
BROWN='\[\033[0;33m\]'
YELLOW='\[\033[1;33m\]'
BLUE='\[\033[0;34m\]'
LIGHTBLUE='\[\033[1;34m\]'
PURPLE='\[\033[0;35m\]'
PINK='\[\033[1;35m\]'
CYAN='\[\033[0;36m\]'
LIGHTCYAN='\[\033[1;36m\]'
NORMAL='\[\033[0m\]'
RESET=
SMILEY="${LIGHTBLUE}[OK]${NORMAL}"
FROWNY="${RED}[ERR]${NORMAL}"
SELECT1="if [ \$? = 0 ]; then echo \"${SMILEY}\"; else echo \"${FROWNY}\"; fi;"
SELECT2="if [ -w \"\$PWD\" ]; then echo -n \"${LIGHTBLUE}\w\"; else echo -n \"${LIGHTRED}\w\"; fi ;"
PS1="${RESET}\`${SELECT1}\`\n${NORMAL}\D{%H:%M}${LIGHTRED}\u${CYAN}@\H \`${SELECT2}\`\n ${YELLOW}\\$ $NORMAL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment