zshrc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. HISTFILE=~/.histfile
  2. HISTSIZE=1000000
  3. SAVEHIST=1000000
  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="nvim"
  18. alias vim="nvim"
  19. # OS X completions
  20. fpath=(/usr/local/share/zsh-completions $fpath)
  21. source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  22. dot_sync() {
  23. current_branch=$(git branch | grep '\*.*' | cut -d '*' -f 2 | tr -d ' ')
  24. if [ -z "$1" ]; then
  25. 1=$current_branch
  26. fi
  27. for branch in $(git branch | grep '^[^*].*$'); do
  28. git ch $branch
  29. git cherry-pick $1 || { echo 'Problems.. manually cherry-pick'; return 0 }
  30. done
  31. git ch $current_branch
  32. }
  33. rmorig() {
  34. if [ "$1" = "-f" ]; then
  35. find . -name "*.orig" -print -delete
  36. else
  37. find . -name "*.orig" -print
  38. fi
  39. }
  40. # Set Home, End, Del, PgUp, PgDown keys to actually do something.
  41. bindkey '^[OH' beginning-of-line
  42. bindkey '^[OF' end-of-line
  43. bindkey '^[[3~' delete-char
  44. bindkey '^[[5~' beginning-of-buffer-or-history
  45. bindkey '^[[6~' end-of-buffer-or-history
  46. export PAGER=less
  47. export DOTFILES=$HOME/Documents/dotfiles
  48. export PATH=$DOTFILES/bin:$PATH
  49. export PATH=$PATH:$HOME/.rvm/bin
  50. export PATH=$PATH:$GOPATH/bin
  51. export PATH=$PATH:$HOME/.cargo/bin
  52. export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/src
  53. alias ack=ag
  54. # added by travis gem
  55. [ -f $HOME/.travis/travis.sh ] && source $HOME/.travis/travis.sh
  56. export DOTNET_CLI_TELEMETRY_OPTOUT=1
  57. export PATH="/usr/local/opt/icu4c/bin:$PATH"
  58. export PATH="/usr/local/opt/icu4c/sbin:$PATH"
  59. export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  60. export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
  61. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
  62. plugins=(
  63. aws
  64. bundler
  65. cargo
  66. docker
  67. docker-compose
  68. git
  69. npm
  70. npx
  71. rails
  72. rake
  73. ruby
  74. rust
  75. rvm
  76. rvm
  77. yarn
  78. )