0

Zsh manual says that /etc/zprofile is sourced during login, but it's not being sourced in my system. But if I add source /etc/zprofile to /etc/zsh/zprofile, the required behaviour is achieved. Initially /etc/zsh/profile contained source /etc/profile. Am I missing something here?

saga
  • 1,401

1 Answers1

3

Likely what has happened is ZSH ships with default X (/etc/zprofile) and your vendor has changed that to Y (/etc/zsh/profile) without also correcting the documentation regarding X. In other words, take documentation about file paths with a grain of salt, especially where a modern relative of Procrustes has shoehorned ZSH into some file hierarchy standard or the other.

Sometimes with strings one can discover these fiddlings with file paths:

strings =zsh | grep profile

Or by tracing the system calls and seeing what files zsh touches e.g. on Linux via strace or sysdig:

strace -o grepme zsh -ic exit
fgrep profile grepme

Actually zsh is good at telling what files it is reading:

zsh -ixc exit 2>&1 | fgrep profile
thrig
  • 34,938