.zshrc 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ZSH=$HOME/.oh-my-zsh
  2. export ZSH="/Users/david/.oh-my-zsh"
  3. ZSH_THEME="dpoggi"
  4. ###### Plugins ######
  5. plugins=(
  6. git
  7. gulp
  8. grunt
  9. textmate
  10. vscode
  11. history-substring-search
  12. zsh-autosuggestions
  13. zsh-syntax-highlighting
  14. )
  15. ###### Keys ######
  16. bindkey -v
  17. bindkey '^P' up-history
  18. bindkey '^N' down-history
  19. bindkey '^?' backward-delete-char
  20. bindkey '^h' backward-delete-char
  21. bindkey '^w' backward-kill-word
  22. bindkey '^r' history-incremental-search-backward
  23. bindkey '^[[A' history-substring-search-up
  24. bindkey '^[[B' history-substring-search-down
  25. bindkey "$terminfo[kcuu1]" history-substring-search-up
  26. bindkey "$terminfo[kcud1]" history-substring-search-down
  27. export KEYTIMEOUT=1
  28. ###### Options ######
  29. # HIST_STAMPS="mm/dd/yyyy"
  30. # ZSH_CUSTOM=/path/to/new-custom-folder
  31. # zstyle ':omz:update' frequency 13
  32. # DISABLE_MAGIC_FUNCTIONS="true"
  33. # DISABLE_LS_COLORS="true"
  34. # DISABLE_AUTO_TITLE="true"
  35. # ENABLE_CORRECTION="true"
  36. # COMPLETION_WAITING_DOTS="true"
  37. # DISABLE_UNTRACKED_FILES_DIRTY="true"
  38. # export MANPATH="/usr/local/man:$MANPATH"
  39. # export ARCHFLAGS="-arch x86_64"
  40. # CASE_SENSITIVE="true"
  41. # DISABLE_AUTO_UPDATE="true"
  42. # export UPDATE_ZSH_DAYS=33
  43. # DISABLE_CORRECTION="true"
  44. # COMPLETION_WAITING_DOTS="true"
  45. # export MANPATH="/usr/local/man:$MANPATH"
  46. # if [[ -n $SSH_CONNECTION ]]; then
  47. # export EDITOR='vim'
  48. # else
  49. # export EDITOR='mvim'
  50. # fi
  51. # export ARCHFLAGS="-arch x86_64"
  52. # export SSH_KEY_PATH="~/.ssh/dsa_id"
  53. source $ZSH/oh-my-zsh.sh
  54. alias zshconfig="vc ~/.zshrc"
  55. alias ohmyzsh="vc ~/.oh-my-zsh"
  56. ###### LIST ######
  57. alias l='ls -lFh' #size,show type,human readable
  58. alias la='ls -lAFh' #long list,show almost all,show type,human readable
  59. alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
  60. alias lt='ls -ltFh' #long list,sorted by date,show type,human readable
  61. alias ll='ls -l' #long list
  62. ###### GIT #######
  63. #alias zshconfig="mate ~/.zshrc"
  64. alias ga="git add"
  65. alias gaa="git add -A"
  66. alias gc="git commit -m '"
  67. alias gs="git status"
  68. alias gcm="git checkout master"
  69. alias gcd="git checkout dev"
  70. alias gmd="git merge dev"
  71. alias gpom="git push origin master"
  72. alias gpcm="git push code master"
  73. alias gpod="git push origin dev"
  74. alias gpcd="git push code dev"
  75. ####### BREW #########
  76. alias brewp='brew pin'
  77. alias brews='brew list -1'
  78. alias brewsp='brew list --pinned'
  79. alias bubo='brew update && brew outdated'
  80. alias bubc='brew upgrade && brew cleanup'
  81. alias bubu='bubo && bubc'
  82. alias bcubo='brew update && brew cask outdated'
  83. alias bcubc='brew cask reinstall $(brew cask outdated) && brew cleanup'
  84. ##### NPM #####
  85. alias nit="npm init --yes"
  86. alias not="npm outdated"
  87. alias nu="npm update"
  88. alias ni="npm install"
  89. alias nu="npm uninstall"
  90. alias nis="npm install --save"
  91. alias nus="npm uninstall --save"
  92. alias nid="npm install --save-dev"
  93. alias nud="npm uninstall --save-dev"
  94. alias nip="npm install --save-prod"
  95. alias nup="npm uninstall --save-prod"
  96. ##### GULP ######
  97. alias gr="gulp run"
  98. alias gb="gulp build"
  99. alias gcl="gulp clean"
  100. ####### Laravel ########
  101. alias pa='php artisan'
  102. alias pacache='php artisan cache:clear'
  103. alias paroutes='php artisan route:list'
  104. alias pavendor='php artisan vendor:publish'
  105. _laravel_get_command_list () {
  106. php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"
  107. }
  108. _laravel () {
  109. if [ -f artisan ]; then
  110. compadd `_laravel_get_command_list`
  111. fi
  112. }
  113. compdef _laravel artisan
  114. compdef _laravel pa
  115. export PATH=$HOME/bin:/usr/local/bin:$PATH
  116. export NVM_DIR="$HOME/.nvm"
  117. [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
  118. [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion