.zshrc 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. ZSH=$HOME/.oh-my-zsh
  2. export ZSH="/Users/david/.oh-my-zsh"
  3. ZSH_THEME="dpoggi"
  4. ###### Plugins ######
  5. plugins=(
  6. history-substring-search
  7. git
  8. gulp
  9. grunt
  10. vs
  11. yarn
  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. # CASE_SENSITIVE="true"
  40. # DISABLE_AUTO_UPDATE="true"
  41. # export UPDATE_ZSH_DAYS=33
  42. # DISABLE_CORRECTION="true"
  43. # COMPLETION_WAITING_DOTS="true"
  44. # export MANPATH="/usr/local/man:$MANPATH"
  45. # if [[ -n $SSH_CONNECTION ]]; then
  46. # export EDITOR='vim'
  47. # else
  48. # export EDITOR='mvim'
  49. # fi
  50. # export ARCHFLAGS="-arch x86_64"
  51. # export ARCHFLAGS="-arch arm64"
  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 ga="git add"
  64. alias gaa="git add -A"
  65. alias gc="git commit -m '"
  66. alias gs="git status"
  67. alias gcm="git checkout main"
  68. alias gcd="git checkout dev"
  69. alias gcp="git checkout prod"
  70. alias gcs="git checkout stage"
  71. alias gmd="git merge dev"
  72. alias gmm="git merge main"
  73. alias gpos="git push origin stage"
  74. alias gpop="git push origin prod"
  75. alias gpom="git push origin main"
  76. alias gpcm="git push code main"
  77. alias gprm="git push org main"
  78. alias gpor="git push origin master"
  79. alias gpcr="git push code master"
  80. alias gpod="git push origin dev"
  81. alias gpcd="git push code dev"
  82. ####### BREW #########
  83. alias brewp='brew pin'
  84. alias brews='brew list -1'
  85. alias brewsp='brew list --pinned'
  86. alias bubo='brew update && brew outdated'
  87. alias bubc='brew upgrade && brew cleanup'
  88. alias bubu='bubo && bubc'
  89. alias bcubo='brew update && brew cask outdated'
  90. alias bcubc='brew cask reinstall $(brew cask outdated) && brew cleanup'
  91. ##### NPM #####
  92. alias nit="npm init --yes"
  93. alias not="npm outdated"
  94. alias nu="npm update"
  95. alias ni="npm install"
  96. alias nu="npm uninstall"
  97. alias nis="npm install --save"
  98. alias nus="npm uninstall --save"
  99. alias nid="npm install --save-dev"
  100. alias nud="npm uninstall --save-dev"
  101. alias nip="npm install --save-prod"
  102. alias nup="npm uninstall --save-prod"
  103. ##### YARN #####
  104. alias ya='yarn add'
  105. alias yi='yarn install'
  106. alias yit='yarn init'
  107. alias yr='yarn remove'
  108. ##### GULP ######
  109. alias gr="gulp run"
  110. alias gb="gulp build"
  111. alias gcl="gulp clean"
  112. ####### Laravel ########
  113. alias pa='php artisan'
  114. alias pacache='php artisan cache:clear'
  115. alias paroutes='php artisan route:list'
  116. alias pavendor='php artisan vendor:publish'
  117. _laravel_get_command_list () {
  118. php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"
  119. }
  120. _laravel () {
  121. if [ -f artisan ]; then
  122. compadd `_laravel_get_command_list`
  123. fi
  124. }
  125. compdef _laravel artisan
  126. compdef _laravel pa
  127. export PATH="/opt/homebrew/opt/php@7.4/bin:$PATH"
  128. export PATH=$HOME/bin:/usr/local/bin:$PATH
  129. export NVM_DIR="$HOME/.nvm"
  130. [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
  131. [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
  132. export PATH="$HOME/.rbenv/bin:$PATH"
  133. eval "$(rbenv init - zsh)"
  134. export PYENV_ROOT="$HOME/.pyenv"
  135. export PATH="$PYENV_ROOT/bin:$PATH"
  136. eval "$(pyenv init -)"
  137. #export PATH="/opt/homebrew/opt/php@7.4/bin:$PATH"
  138. #export PATH="/opt/homebrew/opt/php@7.4/sbin:$PATH"
  139. #export PATH="/opt/homebrew/opt/php@8.1/bin:$PATH"
  140. #export PATH="/opt/homebrew/opt/php@8.1/sbin:$PATH"
  141. export PATH="/opt/homebrew/opt/php@8.3/bin:$PATH"
  142. export PATH="/opt/homebrew/opt/php@8.3/sbin:$PATH"
  143. #export PATH="/opt/homebrew/opt/php/bin:$PATH"
  144. #export PATH="/opt/homebrew/opt/php/sbin:$PATH"
  145. export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"