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?
Asked
Active
Viewed 3,421 times
0

saga
- 1,401
1 Answers
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
if [[ -o login ]]; then; print yes; else; print no; fi
? – Ortomala Lokni Jan 16 '17 at 14:20