bashrc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # If not running interactively, don't do anything
  2. case $- in
  3. *i*) ;;
  4. *) return;;
  5. esac
  6. # don't put duplicate lines or lines starting with space in the history.
  7. # See bash(1) for more options
  8. HISTCONTROL=ignoreboth
  9. # append to the history file, don't overwrite it
  10. shopt -s histappend
  11. # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  12. HISTSIZE=1000
  13. HISTFILESIZE=2000
  14. # check the window size after each command and, if necessary,
  15. # update the values of LINES and COLUMNS.
  16. shopt -s checkwinsize
  17. case "$TERM" in
  18. xterm*|rxvt*)
  19. PS1='[\u@\h \W]\$ '
  20. ;;
  21. *)
  22. ;;
  23. esac
  24. alias ll='ls -alF'
  25. alias la='ls -A'
  26. alias l='ls -CF'
  27. alias ls='ls -G'
  28. if [ -f $(brew --prefix)/etc/bash_completion ]; then
  29. . $(brew --prefix)/etc/bash_completion
  30. fi
  31. export EDITOR="mvim"
  32. alias vim="mvim"
  33. dot_sync() {
  34. current_branch=$(git branch | grep '\*.*' | cut -d '*' -f 2 | tr -d ' ')
  35. if [ -z "$1" ]; then
  36. 1=$current_branch
  37. fi
  38. for branch in $(git branch | grep '^[^*].*$'); do
  39. git ch $branch
  40. git cherry-pick $1 || { echo 'Problems.. manually cherry-pick'; return 0 }
  41. done
  42. git ch $current_branch
  43. }
  44. rmorig() {
  45. if [ "$1" = "-f" ]; then
  46. find . -name "*.orig" -print -delete
  47. else
  48. find . -name "*.orig" -print
  49. fi
  50. }
  51. export PAGER=less
  52. export DOTFILES=$HOME/Documents/dotfiles
  53. export PATH=$DOTFILES/bin:$PATH
  54. export PATH=$PATH:$HOME/.rvm/bin
  55. export PATH=$PATH:$GOPATH/bin
  56. export PATH=$PATH:$HOME/.cargo/bin
  57. #export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/src/
  58. alias ack=ag
  59. # added by travis gem
  60. [ -f $HOME/.travis/travis.sh ] && source $HOME/.travis/travis.sh
  61. export DOTNET_CLI_TELEMETRY_OPTOUT=1
  62. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"