Zsh
Config Commands
Configure Zsh with .zshrc, .zprofile, and .zshenv files. Understand the startup file loading order, set options, and customize your shell environment for maximum productivity.
10 commands
Pro Tips
Use '.zshenv' for environment variables (loaded for all shells) and '.zshrc' for interactive settings (aliases, prompt).
Run 'setopt' to see all enabled options. Use 'setopt AUTO_CD' to cd into directories by just typing the name.
Source changes without restarting: 'source ~/.zshrc' or the shorthand '. ~/.zshrc'.
Common Mistakes
Heavy .zshrc files slow down shell startup. Profile with 'zprof' — add 'zmodload zsh/zprof' at the top and 'zprof' at the bottom.
PATH modifications in .zshrc accumulate with each source. Use 'typeset -U PATH' to deduplicate.