zshrc 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. HISTFILE=~/.histfile
  2. HISTSIZE=1000
  3. SAVEHIST=1000
  4. setopt incappendhistory nomatch correct NO_HUP
  5. unsetopt beep
  6. bindkey -v
  7. zstyle :compinstall filename '/Users/drew/.zshrc'
  8. autoload -Uz compinit
  9. compinit
  10. autoload -U colors && colors
  11. # Have to reset color to cyan after the bold tags for some reason.
  12. PROMPT="%{$fg[cyan]%}[%n@%M %B%1~%b%{$fg[cyan]%}]%# %{$reset_color%}"
  13. alias ll='ls -alF'
  14. alias la='ls -A'
  15. alias l='ls -CF'
  16. alias ls='ls -G'
  17. export EDITOR="mvim"
  18. alias vim="mvim"
  19. alias vimdiff="mvimdiff"
  20. # OS X completions
  21. fpath=(/usr/local/share/zsh-completions $fpath)
  22. source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  23. # OS X keep current PWD when opening new tabs/windows
  24. precmd () {print -Pn "\e]2; %~/ \a"}
  25. preexec () {print -Pn "\e]2; %~/ \a"}
  26. dot_sync() {
  27. current_branch=$(git branch | grep '\*.*' | cut -d '*' -f 2 | tr -d ' ')
  28. if [ -z "$1" ]; then
  29. 1=$current_branch
  30. fi
  31. for branch in $(git branch | grep '^[^*].*$'); do
  32. git ch $branch
  33. git cherry-pick $1 || { echo 'Problems.. manually cherry-pick'; return 0 }
  34. done
  35. git ch $current_branch
  36. }
  37. rmorig() {
  38. if [ "$1" = "-f" ]; then
  39. find . -name "*.orig" -print -delete
  40. else
  41. find . -name "*.orig" -print
  42. fi
  43. }
  44. # Set Home, End, Del, PgUp, PgDown keys to actually do something.
  45. bindkey '^[OH' beginning-of-line
  46. bindkey '^[OF' end-of-line
  47. bindkey '^[[3~' delete-char
  48. bindkey '^[[5~' beginning-of-buffer-or-history
  49. bindkey '^[[6~' end-of-buffer-or-history
  50. export PAGER=less
  51. export DOTFILES=$HOME/Documents/dotfiles
  52. export PATH=$DOTFILES/bin:$PATH
  53. export PATH=$PATH:$HOME/.rvm/bin
  54. export PATH=$PATH:$GOPATH/bin
  55. export PATH=$PATH:$HOME/.cargo/bin
  56. #export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/src/
  57. source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  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/icu4c/bin:$PATH"
  63. export PATH="/usr/local/opt/icu4c/sbin:$PATH"
  64. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"