.zshrc 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. plugins=(history-substring-search git golang gulp grunt textmate)
  23. ###### LIST ######
  24. alias l='ls -lFh' #size,show type,human readable
  25. alias la='ls -lAFh' #long list,show almost all,show type,human readable
  26. alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
  27. alias lt='ls -ltFh' #long list,sorted by date,show type,human readable
  28. alias ll='ls -l' #long list
  29. ###### GIT #######
  30. #alias zshconfig="mate ~/.zshrc"
  31. alias ga="git add"
  32. alias gaa="git add -A"
  33. alias gc="git commit -m '"
  34. alias gs="git status"
  35. alias gcm="git checkout master"
  36. alias gcd="git checkout dev"
  37. alias gmd="git merge dev"
  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. ##### NPM #####
  43. alias nit="npm init --yes"
  44. alias not="npm outdated"
  45. alias nu="npm update"
  46. alias ni="npm install"
  47. alias nu="npm uninstall"
  48. alias nis="npm install --save"
  49. alias nus="npm uninstall --save"
  50. alias nid="npm install --save-dev"
  51. alias nud="npm uninstall --save-dev"
  52. alias nip="npm install --save-prod"
  53. alias nup="npm uninstall --save-prod"
  54. ##### GULP ######
  55. alias gr="gulp run"
  56. alias gb="gulp build"
  57. alias gcl="gulp clean"
  58. ####### Laravel ########
  59. alias pa='php artisan'
  60. alias pacache='php artisan cache:clear'
  61. alias paroutes='php artisan route:list'
  62. alias pavendor='php artisan vendor:publish'
  63. _laravel_get_command_list () {
  64. php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"
  65. }
  66. _laravel () {
  67. if [ -f artisan ]; then
  68. compadd `_laravel_get_command_list`
  69. fi
  70. }
  71. compdef _laravel artisan
  72. compdef _laravel pa
  73. ####### BREW #########
  74. alias brewp='brew pin'
  75. alias brews='brew list -1'
  76. alias brewsp='brew list --pinned'
  77. alias bubo='brew update && brew outdated'
  78. alias bubc='brew upgrade && brew cleanup'
  79. alias bubu='bubo && bubc'
  80. alias bcubo='brew update && brew cask outdated'
  81. alias bcubc='brew cask reinstall $(brew cask outdated) && brew cleanup'
  82. # CASE_SENSITIVE="true"
  83. # DISABLE_AUTO_UPDATE="true"
  84. # export UPDATE_ZSH_DAYS=33
  85. # DISABLE_CORRECTION="true"
  86. # COMPLETION_WAITING_DOTS="true"
  87. # export MANPATH="/usr/local/man:$MANPATH"
  88. # # Preferred editor for local and remote sessions
  89. # if [[ -n $SSH_CONNECTION ]]; then
  90. # export EDITOR='vim'
  91. # else
  92. # export EDITOR='mvim'
  93. # fi
  94. # Compilation flags
  95. # export ARCHFLAGS="-arch x86_64"
  96. # ssh
  97. # export SSH_KEY_PATH="~/.ssh/dsa_id"
  98. bindkey -v
  99. bindkey '^P' up-history
  100. bindkey '^N' down-history
  101. bindkey '^?' backward-delete-char
  102. bindkey '^h' backward-delete-char
  103. bindkey '^w' backward-kill-word
  104. bindkey '^r' history-incremental-search-backward
  105. bindkey '^[[A' history-substring-search-up
  106. bindkey '^[[B' history-substring-search-down
  107. bindkey "$terminfo[kcuu1]" history-substring-search-up
  108. bindkey "$terminfo[kcud1]" history-substring-search-down
  109. fpath=(/usr/local/share/zsh-completions $fpath)
  110. export KEYTIMEOUT=1
  111. source /usr/local/share/zsh-history-substring-search/zsh-history-substring-search.zsh
  112. export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"