Skip to content

Instantly share code, notes, and snippets.

@hanafiah
Created October 24, 2013 09:40
Show Gist options
  • Save hanafiah/7134158 to your computer and use it in GitHub Desktop.
Save hanafiah/7134158 to your computer and use it in GitHub Desktop.
my terminal color
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[31m\]"
YELLOW="\[\033[33m\]"
GREEN="\[\033[32m\]"
BLUE="\[\033[34m\]"
PURPLE="\[\033[35m\]"
CYAN="\[\035[36m\]"
NO_COLOUR="\[\033[0m\]"
export PS1="\u@\H:$RED\w$GREEN\$(parse_git_branch)\n$YELLOW[\$(date +%k:%M:%S)] $NO_COLOUR> "
alias ls="ls -lahG"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment