Guest User

Untitled

a guest
Dec 30th, 2013
774
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. # .bashrc
  2.  
  3. if [[ "$(uname)" != "Darwin" ]]; then # non mac os x
  4.  
  5. # source global bashrc
  6. if [[ -f "/etc/bashrc" ]]; then
  7. . /etc/bashrc
  8. fi
  9.  
  10. export TERM='xterm-256color' # probably shouldn't do this
  11. fi
  12.  
  13. # bash prompt with colors
  14. # [ <user>@<hostname> <working directory> {current git branch (if you're in a repo)} ]
  15. # ==>
  16. PS1="\[\e[1;33m\][ \u\[\e[1;37m\]@\[\e[1;32m\]\h\[\e[1;33m\] \W\$(git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/ {\[\e[1;36m\]\1\[\e[1;33m\]}/') ]\[\e[0m\]\n==> "
  17.  
  18. # execute only in Mac OS X
  19. if [[ "$(uname)" == 'Darwin' ]]; then
  20.  
  21. # if OS X has a $HOME/bin folder, then add it to PATH
  22. if [[ -d "$HOME/bin" ]]; then
  23. export PATH="$PATH:$HOME/bin"
  24. fi
  25.  
  26. alias ls='ls -G' # ls with colors
  27.  
  28. fi
  29.  
  30. alias ll='ls -lah' # long listing of all files with human readable file sizes
  31. alias tree='tree -C' # turns on coloring for tree command
  32. alias mkdir='mkdir -p' # create parent directories as needed
  33. alias vim='vim -p' # if more than one file, open files in tabs
  34.  
  35. export EDITOR='vim'
  36. function _update_ps1()
  37. {
  38. export PS1="$(~/powerline-shell.py $?)"
  39. }
  40.  
  41. export PROMPT_COMMAND="_update_ps1"
Advertisement
Add Comment
Please, Sign In to add comment