Skip to content

Instantly share code, notes, and snippets.

@lucs
Created July 15, 2021 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucs/c321819d1cc126501f6b41a63b6cf0d0 to your computer and use it in GitHub Desktop.
Save lucs/c321819d1cc126501f6b41a63b6cf0d0 to your computer and use it in GitHub Desktop.
Sourced zsh files
- --------------------------------------------------------------------
ʈ zsh startup
From:
http://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-loading-order-bashrc-zshrc-etc/
+-------------------+-----------+-----------+------+
| |Interactive|Interactive|Script|
| |login |non-login | |
+-------------------+-----------+-----------+------+
|/etc/zsh/zshenv | A | A | A |
+-------------------+-----------+-----------+------+
|~/.zshenv | B | B | B |
+-------------------+-----------+-----------+------+
|/etc/zsh/zprofile | C | | |
+-------------------+-----------+-----------+------+
|~/.zprofile | D | | |
+-------------------+-----------+-----------+------+
|/etc/zsh/zshrc | E | C | |
+-------------------+-----------+-----------+------+
|~/.zshrc | F | D | |
+-------------------+-----------+-----------+------+
|/etc/zsh/zlogin | G | | |
+-------------------+-----------+-----------+------+
|~/.zlogin | H | | |
+-------------------+-----------+-----------+------+
+ + + + +
+-------------------+-----------+-----------+------+
|~/.zlogout | I | | |
+-------------------+-----------+-----------+------+
|/etc/zsh/zlogout | J | | |
+-------------------+-----------+-----------+------+
If a letter is present, the indicated file is sourced when in the
context of the column it appears in.
Note that this is not entirely correct, as zsh reads ~/.profile as
well, if ~/.zshrc is not present.
Also note that some distros have files directly in /etc/ instead of
/etc/zsh/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment