.zshrc 4.2 KB

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