Tuesday, July 14, 2015

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


No comments:

Post a Comment

Post your comment here. If you want to say something about programming problems, scripts, software etc, please try to be as descriptive as possible.

Connect Rapoo MT750S with Linux (Tested on Manjaro)

 I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...