# ~/.zshenv — read by *every* zsh, including non-interactive, non-login ones. # # For `ssh `, `zsh -c ...` and plain scripts this is the *only* # startup file zsh reads: ~/.zprofile and ~/.zshrc are both skipped, and on # macOS so is /etc/zprofile, which is what runs path_helper. Without this file # such shells start with the bare system PATH (/usr/bin:/bin:/usr/sbin:/sbin). # # That broke `mosh `: mosh launches mosh-server over ssh as a # non-interactive command, and Homebrew's /opt/homebrew/bin was not on PATH, so # it died with "command not found: mosh-server". Linux hosts happened to work # only because mosh-server lives in /usr/bin there. # # Keep this file a thin shim. The actual environment lives in config/env, which # is POSIX sh so bash can share it. Interactive-only setup (aliases, history, # theme, profile.d, jenv) belongs in config/profile, sourced from ~/.zshrc. # Keep $path/$PATH free of duplicates for the life of this shell. zsh-only, so # it lives here rather than in the POSIX config/env. typeset -U path PATH [ -r "$HOME/.env" ] && . "$HOME/.env" # vim: filetype=zsh