Skip to content

Instantly share code, notes, and snippets.

@benjamintanweihao
Created December 10, 2011 13:50
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 benjamintanweihao/1455211 to your computer and use it in GitHub Desktop.
Save benjamintanweihao/1455211 to your computer and use it in GitHub Desktop.
My current pimped PS1
c_cyan=`tput setaf 6`
c_sgr0=`tput setaf 14`
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="\n\[\e[30;1m\]\[\016\]\[\017\](\[\e[34;1m\]\w\[\e[30;1m\])-(\[\e[1;33m\]\@ \d\[\e[30;1m\])-(\[\e[32;1m\]\$(ls -1 | wc -l | sed 's: ::g') files, \$(ls -lah | grep -m 1 total | sed 's/total //')b\[\e[30;1m\]):\[${c_cyan}\]\e[30;1m\](\e[1;31m\]\$(parse_git_branch)\e[30;1m\]) \[\e[0m\]\n\[\e[1;33m\]#\[${c_sgr0}\] "
@ejamesc
Copy link

ejamesc commented Dec 10, 2011

Wow, what's this? o.O

@benjamintanweihao
Copy link
Author

benjamintanweihao commented Dec 10, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment