I hope to help solve two problems I've encountered and am sure affects other
Gentoo Linux and Zsh users. One is that Zsh doesn't incorporate the setup from
env.d without adding some code for it to my local startup files. The other is
that the files `zshenv', `zshrc', and `zlogin' in the directory `/etc/zsh'
should not be installed as global startup files. They are only meant as
examples and are commented as such. The following line is taken from
# THIS FILE IS NOT INTENDED TO BE USED AS /etc/zshenv, NOR WITHOUT EDITING
Both `zshrc' and `zlogin' bear similar comments.
My suggestion is that these three files not be installed, but rather the
following `zshenv' I've created be used instead:
--- Begin zshenv ---
if [[ -o rcs ]]
if [[ -e "/etc/profile.env" ]]
#077 would be more secure, but 022 is generally quite realistic
if [[ $(/usr/bin/whoami) == 'root' ]]
--- End zshenv ---
Since Zsh is a superset of the POSIX and Bourne shells, I used `/etc/profile' as
template. I've tested this file on my system and have had no problems.
Created attachment 5658 [details]
I later made some minor improvements in `zshenv'. Perhaps increasing
efficiency the tiniest amount, but mostly improving readability by reducing the
level of indent.
Eek, now who put these files into /etc/zsh in the first place?
I removed zshrc and zshlogin and replaced zshenv with your version.
Works pretty well here, thanks for the contribution James.