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` environment variable. However, if said variable is not defined, Zsh will use the user's home directory. This is found on the config scripts as `${ZDOTDIR:-$HOME}` and is a `zsh` idiomatic way of doing something like this:
| `/zshenv` [1] | | system provided minimal environment | Should be minimal set ZDOTDIR, minimal environment. system paths
| | `.zshenv` | user environment overrides non-interactive, non-login shells (when invoked via _shebang_ in a script or via `zsh -c [script]` or when invoked by `make` | Personal environment overrides, such as `MANPATH`, `TERM`, `fpath` (*non interactive scripts should have their environment completly set up here* )
| `/zprofile` | | system profile for login shells (`zsh -lsi``zsh -`` or via _ssh forced command_ ) | Required system paths for remote interaction, site `fpath`, site `$LOCALE`, `$LANG.`
| | `.zprofile` | personal preferences for interactive login shells | your preferred `$LOCALE`, `$LANG`, `readlne` config, `cdpath`, session managers, additional `fpath` user functions, login shells (but non necessarily **ineractive** as when invoked via _ssh remote cmd_ ) will read config up to this point
| `/zshrc` | | system provided startup script, for interactive shells, (local shells that live in an `XTerm`, `URxvt`, `gnome-terminal`) or subshells (like running `xterm` from the command prompt of a _login xterm_, | site login accounting, security monitors, site command logging policy
| | `.zshrc` | user customization of their *interactive* environment for terminals | sourcing custom shell additions (`gcloud.comp.inc`), custom user frameworks (**zprezto** is invoked here), additional path required by custom software installed in `/opt/`
| `/zlogin` | | additional customization for interactive **login** shells, such as those accessed via ssh | `tmux attach` to existing session
| | `.zlogin` | user script for *login shell startup* (this shell is a session leader, and allocates a `ptty`) | aliases, keybindings, personal startup programs, time tracking apps, session managers, quote of the day, fortunes
| | `.zlogout` | personal cleanup tasks | unmounting your *fuse* personal fylesystems, async encryption of sensitive directoriesm backup kickoff, setting personal `crontabs` or `at` tasks, logging checout to your time tracking software, fortune to say goodbye.
That is quite a few files to configure a shell. Why so many? Mostly to accomodate different roles for shell software. Shell scripts probably don't need aliases or keybindings, but a human user will certainly appreciate it, Logging in to a XTerminal or remotely logging in via ssh are also different, but possible scenarios that require different configurations so, depending on the way you are connected or using yor computer, you'd need different sets of configuration, Since each kind of session will only read up to a certain point in the `runcoms` chain, it is important to place the correct configuration directves on the appropriate files, this way we can have speedy shells that don't waste a lot of energy, or can have all kinds of user optimization such as aliases and keymaps
Prezto leverages these good design decisions to provide a great, fast, featureful user experience, and to avoid consuming any more resources than necessary. So, with this in mind you have the flexibility to adapt the `zsh` features that prezto surfaces to your workload and tastes, ranging from the prompt theme, shortcut keys, favorite editor and pager, aliases and even syntax highlighting.! Prezto is designed in such a way to allow you to configure other aspects of your shell in the appropriate files wthout breaking the framework or forcing you to write your preferences in a particular plugin structure. In the end, its a matter of editing one ofthe files mentioned above.
That being said, you can use the runcoms files as-is, replacing what used to be on your system, or merge your customizations with prezto's runcoms. When you update your distribution, be careful not to clobber your changes if you decided to use the files as-is. Another way of maintaining your configuration is to copy prezto's runcoms instead of symlinking them, and keep track of them independently of the core prezto distribution. If you're just starting with zsh, the first approach is faster and easier to get you going, while copying and merging the runcoms independently gives you maximum flexibility for advanced use cases.
For a more detailed discussion on the zsh startup process and how prezto integrates with it, see *further reading* below.