Guest User

Untitled

a guest
Sep 26th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. # Colours
  2. txtgrn='\[\e[0;32m\]' # Green
  3. txtylw='\[\e[0;33m\]' # Yellow
  4. txtblu='\[\e[0;34m\]' # Blue
  5. txtpur='\[\e[0;35m\]' # Purple
  6. txtcyn='\[\e[0;36m\]' # Cyan
  7. txtwht='\[\e[0;37m\]' # White
  8. bldblk='\[\e[1;30m\]' # Black - Bold
  9. bldred='\[\e[1;31m\]' # Red - Bold
  10. bldgrn='\[\e[1;32m\]' # Green - Bold
  11. bldylw='\[\e[1;33m\]' # Yellow - Bold
  12. bldblu='\[\e[1;34m\]' # Blue - Bold
  13. bldpur='\[\e[1;35m\]' # Purple - Bold
  14. bldcyn='\[\e[1;36m\]' # Cyan - Bold
  15. bldwht='\[\e[1;37m\]' # White - Bold
  16. txtrst='\[\e[0m\]' # Text Reset
  17.  
  18. # Function called before prompt
  19. function pre_prompt_print(){
  20. # Git branch
  21. GIT_BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[git:\1]/'`
  22. }
  23.  
  24. PROMPT_COMMAND=pre_prompt_print
  25. PS1="$bldgrn\u$txtrst@$bldpur\h$txtrst:$bldblu\w$txtrst $bldpur\${GIT_BRANCH}$txtrst\n$bldylw\!$txtrst> "
  26.  
  27. # Git aliases
  28. alias gita='git add'
  29. alias gitc='git commit -m'
  30. alias gits='git status -s'
  31. alias gitl='git log --oneline --color'
  32. alias gitb='git branch --color'
  33. alias gitu='git reset --HEAD^'
  34.  
  35. # Other Aliases
  36. alias df='df -h'
  37. alias ll='ls -lh'
  38. alias pud='pushd'
  39. alias pod='popd'
  40.  
  41. # Load RVM into a shell session *as a function*
  42. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
  43.  
  44. # Add RVM to PATH for scripting
  45. PATH=$PATH:$HOME/.rvm/bin
Add Comment
Please, Sign In to add comment