From e025336f2f6d9f107ee1e03b9900f04af0544ba9 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sat, 1 Apr 2000 20:43:43 +0000 Subject: Updated from list as far as 10376 --- Doc/Zsh/files.yo | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) (limited to 'Doc/Zsh/files.yo') diff --git a/Doc/Zsh/files.yo b/Doc/Zsh/files.yo index 0d775a14f..aeb4ae885 100644 --- a/Doc/Zsh/files.yo +++ b/Doc/Zsh/files.yo @@ -6,12 +6,17 @@ cindex(startup files) cindex(files, shutdown) cindex(shutdown files) pindex(NO_RCS, use of) -Commands are first read from tt(/etc/zshenv). -If the tt(RCS) option is unset -within tt(/etc/zshenv), all other -initialization files are skipped. -Otherwise, commands are read -from tt($ZDOTDIR/.zshenv). +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, any subsequent startup file(s) of the corresponding +type 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). @@ -20,7 +25,35 @@ 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 implicit 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. + +As tt(/etc/zshenv) is run for all instances of zsh, it is important that +it be kept as small as possible. In particular, it is a good idea to +put code that does not need to be run for every single shell behind +a test of the form `tt(if [[ -o rcs ]]; then ...)' so that it will not +be executed when zsh is invoked with the `tt(-f)' option. ifnzman(includefile(Zsh/filelist.yo)) + +Any of these files may be pre-compiled with the tt(zcompile) builtin +command (\ +ifzman(\ +see zmanref(zshbuiltins)\ +)\ +ifnzman(\ +noderef(Shell Builtin Commands)\ +)\ +). If a compiled file exists (named for the original file plus the +tt(.zwc) extension) and it is newer than the original file, the compiled +file will be used instead. -- cgit 1.4.1