Skip to content

Instantly share code, notes, and snippets.

@andykais
Created July 5, 2015 06:17
Show Gist options
  • Save andykais/0d9df75dba4019a878c9 to your computer and use it in GitHub Desktop.
Save andykais/0d9df75dba4019a878c9 to your computer and use it in GitHub Desktop.
PS1 code to get colored folder and user info
PS1='$(if [ $? -eq 0 ]; then echo "\[\033[32m\]:)"; else echo "\[\033[31m\]:("; fi) ${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u : \[\033[01;34m\]$(echo $(pwd) | grep -o "/" | wc -l)/$(basename $(pwd))\[\033[00m\] - '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment