.zshrc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ZSH=$HOME/.oh-my-zsh
  2. export PATH="/usr/local/opt/openssl/bin:$PATH"
  3. export PATH="/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/share/npm/bin:$PATH"
  4. export PATH=$HOME/bin:/usr/local/bin:$PATH
  5. export PATH="/usr/local/git/bin:$PATH"
  6. export PATH=/usr/local/share/npm/bin:$PATH
  7. export NODE_PATH=/usr/local/lib/node_modules
  8. export PATH="$PATH:~/.composer/vendor/bin"
  9. MYSQL=/usr/local/mysql/bin
  10. export PATH=$PATH:$MYSQL
  11. export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
  12. export NVM_DIR=~/.nvm
  13. source $(brew --prefix nvm)/nvm.sh
  14. PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
  15. [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
  16. ZSH_THEME="dpoggi"
  17. export EDITOR='mate -w'
  18. export EDITOR='subl -w'
  19. DISABLE_AUTO_UPDATE="false"
  20. source $ZSH/oh-my-zsh.sh
  21. ##### PLUGINS ######
  22. #
  23. plugins=(history-substring-search git golang gulp grunt textmate)
  24. ZSH_COLORIZE_TOOL=chroma
  25. ZSH_COLORIZE_STYLE="sunburst"
  26. ###### LIST ######
  27. alias l='ls -lFh' #size,show type,human readable
  28. alias la='ls -lAFh' #long list,show almost all,show type,human readable
  29. alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
  30. alias lt='ls -ltFh' #long list,sorted by date,show type,human readable
  31. alias ll='ls -l' #long list
  32. ###### GIT #######
  33. #alias zshconfig="mate ~/.zshrc"
  34. alias ga="git add"
  35. alias gaa="git add -A"
  36. alias gc="git commit -m '"
  37. alias gs="git status"
  38. alias gpom="git push origin master"
  39. alias gpcm="git push code master"
  40. alias gpod="git push origin dev"
  41. alias gpcd="git push code dev"
  42. ####### Laravel ########
  43. alias pa='php artisan'
  44. alias pacache='php artisan cache:clear'
  45. alias paroutes='php artisan route:list'
  46. alias pavendor='php artisan vendor:publish'
  47. _laravel_get_command_list () {
  48. php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"
  49. }
  50. _laravel () {
  51. if [ -f artisan ]; then
  52. compadd `_laravel_get_command_list`
  53. fi
  54. }
  55. compdef _laravel artisan
  56. compdef _laravel pa
  57. ####### BREW #########
  58. alias brewp='brew pin'
  59. alias brews='brew list -1'
  60. alias brewsp='brew list --pinned'
  61. alias bubo='brew update && brew outdated'
  62. alias bubc='brew upgrade && brew cleanup'
  63. alias bubu='bubo && bubc'
  64. alias bcubo='brew update && brew cask outdated'
  65. alias bcubc='brew cask reinstall $(brew cask outdated) && brew cleanup'
  66. # CASE_SENSITIVE="true"
  67. # DISABLE_AUTO_UPDATE="true"
  68. # export UPDATE_ZSH_DAYS=33
  69. # DISABLE_CORRECTION="true"
  70. # COMPLETION_WAITING_DOTS="true"
  71. # export MANPATH="/usr/local/man:$MANPATH"
  72. # # Preferred editor for local and remote sessions
  73. # if [[ -n $SSH_CONNECTION ]]; then
  74. # export EDITOR='vim'
  75. # else
  76. # export EDITOR='mvim'
  77. # fi
  78. # Compilation flags
  79. # export ARCHFLAGS="-arch x86_64"
  80. # ssh
  81. # export SSH_KEY_PATH="~/.ssh/dsa_id"
  82. bindkey -v
  83. bindkey '^P' up-history
  84. bindkey '^N' down-history
  85. bindkey '^?' backward-delete-char
  86. bindkey '^h' backward-delete-char
  87. bindkey '^w' backward-kill-word
  88. bindkey '^r' history-incremental-search-backward
  89. bindkey '^[[A' history-substring-search-up
  90. bindkey '^[[B' history-substring-search-down
  91. bindkey "$terminfo[kcuu1]" history-substring-search-up
  92. bindkey "$terminfo[kcud1]" history-substring-search-down
  93. fpath=(/usr/local/share/zsh-completions $fpath)
  94. export KEYTIMEOUT=1
  95. source /usr/local/share/zsh-history-substring-search/zsh-history-substring-search.zsh