z shell lifecycle - simeonlam/knowledge GitHub Wiki

  1. Init
    • /etc/zshenv
    • $ZDOTDIR/.zshenv
  2. If the shell is a login shell
    • /etc/zprofile
    • $ZDOTDIR/.zprofile
  3. If the shell is interactive
    • /etc/zshrc
    • $ZDOTDIR/.zshrc
  4. If the shell is a login shell
    • /etc/zlogin
    • $ZDOTDIR/.zlogin
  5. If the shell is a login shell and exit or logout
    • /etc/zlogout (installation-specific - /etc is the default)
    • $ZDOTDIR/.zlogout

** ZDOTDIR - The directory to search for shell startup files (.zshrc, etc), if not $HOME

** TMPPREFIX - A pathname prefix which the shell will use for all temporary files. Note that this should include an initial part for the file name as well as any directory names. The default is ‘/tmp/zsh’.

[source html] [source pdf]