Hi Chris,

/etc/profile should do the preparation work for users settings in .zshrc.
But
since .zlogin is sourced after .zshrc, it will override users settings in
.zshrc. It resets $PATH and many other environment variables. This is
counterintuitive.

You can find what archlinux did here:
https://wiki.archlinux.org/index.php/Zsh

   - /etc/zsh/zprofile Used for executing commands at start, will be
   sourced when starting as a *login shell*. Please note that on Arch
   Linux, by default it contains one line
   
<https://projects.archlinux.org/svntogit/packages.git/tree/trunk/zprofile?h=packages/zsh>
   which source the /etc/profile.
      - /etc/profile This file should be sourced by all Bourne-compatible
      shells upon login: it sets up $PATH and other environment variables
      and application-specific (/etc/profile.d/*.sh) settings upon login.
   - $ZDOTDIR/.zprofile Used for executing user's commands at start, will
   be sourced when starting as a *login shell*.
   - ...
   - $ZDOTDIR/.zshrc Used for setting user's interactive shell
   configuration and executing commands, will be sourced when starting
as an *interactive
   shell*.
   - ...
   - $ZDOTDIR/.zlogin Used for executing user's commands at ending of
   initial progress, will be sourced when starting as a *login shell*.


On Sun, Oct 14, 2018, 09:34 Chris Marusich <cmmarus...@gmail.com> wrote:

>
> Is the intended use of .zprofile any different from the intended use of
> .zlogin?  If .zprofile and .zlogin are both meant to serve the same
> purpose, then I'm not sure why one would be preferable over the other.
>
>

Reply via email to