This repository has been archived on 2022-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
prezto/templates
2012-06-12 15:13:21 -04:00
..
README.md Correct spelling mistakes in READMEs 2012-06-12 15:13:21 -04:00
zlogin [Fix #171] Background non-session affecting code 2012-05-31 17:39:16 -04:00
zlogout [#171] Add templates and README for all rc files 2012-05-31 17:35:07 -04:00
zprofile [#171] Add templates and README for all rc files 2012-05-31 17:35:07 -04:00
zshenv Remove the home directory from $cdpath 2012-05-31 22:17:14 -04:00
zshrc [#149] Merge alias into utility 2012-06-10 20:04:55 -04:00

Zsh Configuration Files

Zsh has several system-wide and user-local configuration files.

System-wide configuration files are installation-dependent but are installed in /etc by default.

User-local configuration files have the same name as their global counterparts but are prefixed with a dot (hidden). Zsh looks for these files in the path stored in the $ZDOTDIR environmental variable. However, if said variable is not defined, Zsh will use the user's home directory.

File Descriptions

The configuration files are read in the following order:

  1. /etc/zshenv
  2. ~/.zshenv
  3. /etc/zprofile
  4. ~/.zprofile
  5. /etc/zshrc
  6. ~/.zshrc
  7. /etc/zlogin
  8. ~/.zlogin
  9. ~/.zlogout
  10. /etc/zlogout

zshenv

This file is sourced by all instances of Zsh, and thus, it should be kept as small as possible and should only define environment variables.

zprofile

This file is similar to zlogin, but it is sourced before zshrc. It was added for KornShell fans. See the description of zlogin bellow for what it may contain.

zprofile and zlogin are not meant to be used concurrently but can be done so.

zshrc

This file is sourced by interactive shells. It should define aliases, functions, shell options, and key bindings.

This is the main Oh My Zsh configuration file.

zlogin

This file is sourced by login shells after zshrc, and thus, it should contain commands that need to execute at login. It is usually used for messages such as fortune, msgs, or for the creation of files.

This is not the file to define aliases, functions, shell options, and key bindings. It should not change the shell environment.

zlogout

This file is sourced by login shells during logout. It should be used for displaying messages and the deletion of files.

Authors

The authors of these files should be contacted via the issue tracker.