############################################### # FAST + CLEAN ZSH CONFIG FOR RADU (iTerm2) ############################################### ############################################### # PATH CLEANUP ############################################### # Local npm packages NPM_PACKAGES="$HOME/.npm_packages" # Brew-related paths export PATH="/usr/local/opt/apr/bin:/usr/local/opt/apr-util/bin:$PATH" export PKG_CONFIG_PATH="/usr/local/opt/apr/lib/pkgconfig:/usr/local/opt/apr-util/lib/pkgconfig" # PHP paths export PATH="/usr/local/opt/php@8.1/bin:$PATH" export PATH="/usr/local/opt/php@8.1/sbin:$PATH" # Apache export PATH="/usr/local/opt/httpd/bin:$PATH" # Local npm export PATH="$PATH:$NPM_PACKAGES/bin" echo ".zshrc loaded" ############################################### # HISTORY (better than default) ############################################### HISTFILE=$HOME/.zsh_history HISTSIZE=5000 SAVEHIST=5000 setopt SHARE_HISTORY # Sync history between tabs setopt HIST_IGNORE_DUPS # Don’t save duplicates setopt HIST_REDUCE_BLANKS # Clean up whitespace ############################################### # MODERN COMPLETION SYSTEM (very fast) ############################################### # Use cached directory to speed up compinit zstyle ':completion:*' rehash true zstyle ':completion:*' cache-path ~/.zcompcache autoload -Uz compinit compinit -C # -C uses cache for instant startup ############################################### # ENABLE BASH COMPLETION COMPAT FOR NG ############################################### autoload -Uz bashcompinit bashcompinit ############################################### # SUPER FAST LAZY-LOADED ANGULAR COMPLETION ############################################### # Loads only when you press TAB after "ng" _ng_lazy_completion() { source <(ng completion script) unfunction _ng_lazy_completion } compdef _ng_lazy_completion ng ############################################### # ALIASES ############################################### alias gitwpdzsap='git --git-dir=$HOME/Library/CloudStorage/Dropbox/hosts/devsite/wpzoomsounds/.git --work-tree=$HOME/Library/CloudStorage/Dropbox/hosts/ngi/wp2/wp-content/plugins/dzs-zoomsounds' ############################################### # PROMPT (CLEAN, FAST, NICE) ############################################### autoload -Uz colors && colors PROMPT='%F{cyan}%n%f@%F{blue}%m%f %F{yellow}%1~%f %# ' ############################################### # QUALITY OF LIFE SETTINGS ############################################### setopt AUTO_CD # type folder name to cd setopt AUTO_PUSHD # pushd on cd automatically setopt PUSHD_IGNORE_DUPS setopt CORRECT # auto-correct cd typos setopt EXTENDED_GLOB # powerful globbing (useful) setopt MULTIOS # tee-like redirections