zshrc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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=(/opt/homebrew/share/zsh-completions $fpath)
  21. source /opt/homebrew/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. bindkey '^R' history-incremental-search-backward
  47. export PAGER=less
  48. export DOTFILES=$HOME/Documents/dotfiles
  49. export PATH=$DOTFILES/bin:$PATH
  50. export PATH=$PATH:$HOME/.rvm/bin
  51. export PATH=$PATH:$GOPATH/bin
  52. export PATH=$PATH:$HOME/.cargo/bin
  53. export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/src
  54. alias ack=ag
  55. # added by travis gem
  56. [ -f $HOME/.travis/travis.sh ] && source $HOME/.travis/travis.sh
  57. export DOTNET_CLI_TELEMETRY_OPTOUT=1
  58. export PATH="/usr/local/opt/icu4c/bin:$PATH"
  59. export PATH="/usr/local/opt/icu4c/sbin:$PATH"
  60. export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  61. export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
  62. [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
  63. plugins=(
  64. aws
  65. bundler
  66. cargo
  67. docker
  68. docker-compose
  69. git
  70. npm
  71. npx
  72. rails
  73. rake
  74. ruby
  75. rust
  76. rvm
  77. rvm
  78. yarn
  79. )
  80. eval "$(/opt/homebrew/bin/brew shellenv)"
  81. export NVM_DIR="$HOME/.nvm"
  82. [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
  83. [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
  84. export GPG_TTY=$(tty)