about summary refs log tree commit diff
path: root/Doc/Zsh/files.yo
blob: 17b29677b916083da8d140c28216d132c2f91520 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
texinode(Files)(Shell Grammar)(Invocation)(Top)
chapter(Files)
sect(Startup/Shutdown Files)
cindex(files, startup)
cindex(startup files)
cindex(files, shutdown)
cindex(shutdown files)
pindex(NO_RCS, use of)
pindex(NO_GLOBAL_RCS, use of)
Commands are first read from tt(/etc/zshenv); this cannot be overridden.
Subsequent behaviour is modified by the tt(RCS) and
tt(GLOBAL_RCS) options; the former affects all startup files, while the
second only affects those in the tt(/etc) directory.  If one of the options
is unset at any point, the corresponding startup file(s) will not be read.
It is also possible for a file in tt($ZDOTDIR) to re-enable
tt(GLOBAL_RCS). Both tt(RCS) and tt(GLOBAL_RCS) are set by default.

Commands are then read from tt($ZDOTDIR/.zshenv).
pindex(LOGIN, use of)
If the shell is a login shell, commands
are read from tt(/etc/zprofile) and then tt($ZDOTDIR/.zprofile).
Then, if the shell is interactive,
commands are read from tt(/etc/zshrc) and then tt($ZDOTDIR/.zshrc).
Finally, if the shell is a login shell, tt(/etc/zlogin) and
tt($ZDOTDIR/.zlogin) are read.

When a login shell exits, the files tt($ZDOTDIR/.zlogout) and then
tt(/etc/zlogout) are read.  This happens with either an explicit exit
via the tt(exit) or tt(logout) commands, or an implict exit by reading
end-of-file from the terminal.  However, if the shell terminates due
to tt(exec)'ing another process, the logout files are not read.
These are also affected by the tt(RCS) and tt(GLOBAL_RCS) options.
Note also that the tt(RCS) option affects the saving of history files,
i.e. if tt(RCS) is unset when the shell exits, no history file will be
saved.

If tt(ZDOTDIR) is unset, tt(HOME) is used instead.
Those files listed above as being in tt(/etc) may be in another
directory, depending on the installation.
ifnzman(includefile(Zsh/filelist.yo))