2012-09-03 22:38:18 +02:00
|
|
|
Configuration Files
|
|
|
|
===================
|
2012-05-22 18:49:45 +02:00
|
|
|
|
|
|
|
Zsh has several system-wide and user-local configuration files.
|
|
|
|
|
2012-09-03 22:38:18 +02:00
|
|
|
Prezto has one user-local configuration file.
|
|
|
|
|
2012-05-22 18:49:45 +02:00
|
|
|
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:
|
|
|
|
|
|
|
|
01. /etc/zshenv
|
|
|
|
02. ~/.zshenv
|
|
|
|
03. /etc/zprofile
|
|
|
|
04. ~/.zprofile
|
|
|
|
05. /etc/zshrc
|
|
|
|
06. ~/.zshrc
|
2012-09-03 22:38:18 +02:00
|
|
|
07. ~/.zpreztorc
|
|
|
|
08. /etc/zlogin
|
|
|
|
09. ~/.zlogin
|
|
|
|
10. ~/.zlogout
|
|
|
|
11. /etc/zlogout
|
2012-05-22 18:49:45 +02:00
|
|
|
|
|
|
|
### zshenv
|
|
|
|
|
|
|
|
This file is sourced by all instances of Zsh, and thus, it should be kept as
|
2012-06-12 21:13:21 +02:00
|
|
|
small as possible and should only define environment variables.
|
2012-05-22 18:49:45 +02:00
|
|
|
|
|
|
|
### zprofile
|
|
|
|
|
|
|
|
This file is similar to zlogin, but it is sourced before zshrc. It was added
|
2013-03-09 05:35:22 +01:00
|
|
|
for [KornShell][1] fans. See the description of zlogin below for what it may
|
2012-05-22 18:49:45 +02:00
|
|
|
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.
|
|
|
|
|
2013-11-29 23:34:34 +01:00
|
|
|
### zpreztorc
|
2012-09-03 22:38:18 +02:00
|
|
|
|
|
|
|
This file configures Prezto.
|
2012-05-22 18:49:45 +02:00
|
|
|
|
|
|
|
### 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][2], [msgs][3], 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][4].*
|
|
|
|
|
|
|
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
|
|
|
|
|
|
|
[1]: http://www.kornshell.com
|
|
|
|
[2]: http://en.wikipedia.org/wiki/Fortune_(Unix)
|
|
|
|
[3]: http://www.manpagez.com/man/1/msgs
|
2012-09-03 22:08:39 +02:00
|
|
|
[4]: https://github.com/sorin-ionescu/prezto/issues
|