1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 06:58:01 +00:00
prezto/runcoms
Indrajit Raychaudhuri 3dc3fa7f8c zprofile: Expand the default list of well known paths
Two additional sets of paths are now added to the default list of well
known paths: '$HOME/{bin,sbin}' and '/opt/{homebrew,local}/{bin,sbin}'.

- '$HOME/{bin,sbin}': Most users have custom scripts in '$HOME/bin'
anyway, we might as well honor those. '$HOME/sbin' is not really common,
but we can keep it for consistency.
- '/opt/{homebrew,local}/{bin,sbin}': With Homebrew changing default
installation location in macOS on Apple Silicon which will eventually
become ubiquitous, we have a good reason to add these paths by default.
While at it, we also honor MacPorts installation.

In all cases, we add them _iff_ the paths actually exist, not otherwise.
This has the side effect of a newly installed program not available
immediately in the '$path' in a mint fresh system (because of the fact
that '/opt/{homebrew,local}/{bin,sbin}' won't exist initially) until the
shell is reloaded. But that's a minor inconvenience to keep the '$path'
from getting unnecessarily bloated.
2022-04-08 14:30:45 -05:00
..
README.md general: Reformat runcom documentation 2021-07-07 09:56:22 -05:00
zlogin Make .zcomp* location configurable (#1842) 2020-06-04 13:53:44 -07:00
zlogout Remove zlogout's Apu quote (#1583) 2018-05-22 18:44:57 -07:00
zpreztorc general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
zprofile zprofile: Expand the default list of well known paths 2022-04-08 14:30:45 -05:00
zshenv Avoid setting TMPDIR and make sure all modules handle that properly 2017-07-28 10:24:51 -07:00
zshrc Only one newline at end of file 2014-10-09 23:38:15 -04:00

Configuration Files

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

Additionally, Prezto has one user-local configuration file.

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 environment 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. ${ZDOTDIR:-$HOME}/.zshenv
  3. /etc/zprofile
  4. ${ZDOTDIR:-$HOME}/.zprofile
  5. /etc/zshrc
  6. ${ZDOTDIR:-$HOME}/.zshrc
  7. ${ZDOTDIR:-$HOME}/.zpreztorc
  8. /etc/zlogin
  9. ${ZDOTDIR:-$HOME}/.zlogin
  10. ${ZDOTDIR:-$HOME}/.zlogout
  11. /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 below for what it may contain.

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

zshrc

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

zpreztorc

This file configures Prezto.

zlogin

This file is sourced by login shells after zshrc. 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 for deletion of files.

Authors

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