Wednesday, September 21, 2016

Adding profile d envvars to zsh

Adding profile d envvars to zsh


This is an extremely simple task to accomplish. Since, bash uses the following code segment to source all the files under /etc/profile.d you just have to add this into your ~/.zprofile or /etc/zprofile (the former sounds like a much more flexible choice).

# The default umask is now handled by pam_umask.
# See pam_umask(8) and /etc/login.defs.

if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi



Go to link download