Guest User

Untitled

a guest
Oct 15th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. function git_branch_name() {
  2. git branch 2>/dev/null | grep -e '^*' | sed -E 's/^\* (.+)$/(\1) /'
  3. }
  4.  
  5. function show_colored_git_branch_in_prompt() {
  6. PS1="\[\033[01;32m\]\u@\h:\[\033[01;34m\]\w\[\033[31m\]\$(git_branch_name)\[\033[m\]$ "
  7. }
  8. #export ps1 to bash colors
  9. show_colored_git_branch_in_prompt
  10.  
  11.  
  12. # Cli Colors
  13. export CLICOLOR=1
  14. # use yellow for dir’s
  15. export LSCOLORS=dxfxcxdxbxegedabagacad
  16.  
  17. # history handling
  18. #
  19. # Erase duplicates
  20. export HISTCONTROL=erasedups
  21. # resize history size
  22. export HISTSIZE=10000
  23. # append to bash_history if Terminal.app quits
  24. shopt -s histappend
  25.  
  26. #PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
  27. [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
Add Comment
Please, Sign In to add comment