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 `/etc/zsh/zshenv': # 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 ]] then if [[ -e "/etc/profile.env" ]] then source /etc/profile.env fi #077 would be more secure, but 022 is generally quite realistic umask 022 if [[ $(/usr/bin/whoami) == 'root' ]] then export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}" else export PATH="/bin:/usr/bin:${PATH}" fi unset ROOTPATH fi --- 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] zshenv 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. -phoen][x-