Should the code for parsing /etc/zprofile.d
be moved to the very bottom of the script? Why:
- Allows overwriting the defaults set beforehand.
- Does not stop execution of defaults in case any scripts residing in
/etc/zprofile.d
have an issue.
Keeping in mind:
bash /etc/profile.d
:
- Parsed in “CLI” mode, i.e.
login
, real terminal (tty
). - Not parsed in terminal emulator / X11.
zsh /etc/zprofile.d
:
- Parsed in “CLI” mode, i.e.
login
, real terminal (tty
). - Also parsed in terminal emulator / X11.
For bash, therefore /etc/X11/Xsession.d
needed to be used because there’s no /etc/bashrc.d
.