bashrc 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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="nvim"
  32. alias vim="vim"
  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. export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  63. export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
  64. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
  65. source "$HOME/.cargo/env"
  66. export NVM_DIR="$HOME/.nvm"
  67. [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
  68. [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion