Skip to content

Instantly share code, notes, and snippets.

@sirwolfgang
Last active June 7, 2017 21:10
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 sirwolfgang/5115503 to your computer and use it in GitHub Desktop.
Save sirwolfgang/5115503 to your computer and use it in GitHub Desktop.
Color Bash Prompts
# Environment
PS1='\[\e[0;32m\]\u@\h\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] '
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
# Ruby
source /usr/local/opt/chruby/share/chruby/chruby.sh
chruby ruby-2.3.1
source /usr/local/opt/chruby/share/chruby/auto.sh
# Node
export NVM_DIR=~/.nvm
[ -s "$(brew --prefix nvm)/nvm.sh" ] && . "$(brew --prefix nvm)/nvm.sh"
nvm use node > /dev/null
# For Normal Users
PS1='\[\e[0;32m\]\u@\h\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] '
# For Root
PS1='\[\e[0;31m\]\u@\h\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$\[\e[m\] '
# For Apps
export GREP_OPTIONS='--color=auto'
export LS_OPTS='--color=auto'
alias ls='ls ${LS_OPTS}'
alias less='less --RAW-CONTROL-CHARS'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment