Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. txtblk='\e[0;30m' # Black - Regular
  2. txtred='\e[0;31m' # Red
  3. txtgrn='\e[0;32m' # Green
  4. txtylw='\e[0;33m' # Yellow
  5. txtblu='\e[0;34m' # Blue
  6. txtpur='\e[0;35m' # Purple
  7. txtcyn='\e[0;36m' # Cyan
  8. txtwht='\e[0;37m' # White
  9. bldblk='\e[1;30m' # Black - Bold
  10. bldred='\e[1;31m' # Red
  11. bldgrn='\e[1;32m' # Green
  12. bldylw='\e[1;33m' # Yellow
  13. bldblu='\e[1;34m' # Blue
  14. bldpur='\e[1;35m' # Purple
  15. bldcyn='\e[1;36m' # Cyan
  16. bldwht='\e[1;37m' # White
  17. unkblk='\e[4;30m' # Black - Underline
  18. undred='\e[4;31m' # Red
  19. undgrn='\e[4;32m' # Green
  20. undylw='\e[4;33m' # Yellow
  21. undblu='\e[4;34m' # Blue
  22. undpur='\e[4;35m' # Purple
  23. undcyn='\e[4;36m' # Cyan
  24. undwht='\e[4;37m' # White
  25. bakblk='\e[40m' # Black - Background
  26. bakred='\e[41m' # Red
  27. badgrn='\e[42m' # Green
  28. bakylw='\e[43m' # Yellow
  29. bakblu='\e[44m' # Blue
  30. bakpur='\e[45m' # Purple
  31. bakcyn='\e[46m' # Cyan
  32. bakwht='\e[47m' # White
  33. txtrst='\e[0m' # Text Reset
  34.  
  35. function formattedGitBranch {
  36. _branch=$(git branch 2>/dev/null|grep -e ^*|tr -d '* ')
  37. test -n "$_branch" && echo "($_branch)"
  38. }
  39.  
  40. print_before_the_prompt () {
  41. printf "\n$txtgrn%s: $txtblu%s $txtpur%s$txtwht%s$(formattedGitBranch)\n$txtrst" "$USER" "$PWD"
  42. }
  43.  
  44. PROMPT_COMMAND=print_before_the_prompt
  45. PS1='~> '
  46.  
  47. alias tw='open -a /Applications/TextWrangler.app'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement