guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: move "source /etc/profile" from .zlogin to .zprofile


From: Chris Marusich
Subject: Re: move "source /etc/profile" from .zlogin to .zprofile
Date: Sat, 13 Oct 2018 23:30:10 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Leo and Meiyo,

Leo Famulari <address@hidden> writes:

> On Sat, Oct 13, 2018 at 06:33:59PM -0700, Chris Marusich wrote:
>> [...]  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.
>
> The difference is that they are used at different times — zprofile is
> used before zshrc, whereas zlogin is used after zshrc.

Meiyo Peng <address@hidden> writes:

> [...] [S]ince .zlogin is sourced after .zshrc, it will override users
> settings in .zshrc. It resets $PATH and many other environment
> variables. This is counterintuitive.

I see.  I'm not a zsh user, but I agree it would make sense to rename
.zlogin to .zprofile.  I've attached a patch that does this in our
/etc/skel.  I haven't tested it, though.  Would you like to test it and
let me know if it works for you?

I see that zsh also sources files like /etc/zprofile when they exist.  I
don't have a strong preference for putting this into /etc/zprofile
vs. putting it into ~/.zprofile (via /etc/skel).  What do you think
about that?

Can anybody think of anything bad that might happen if we apply the
attached patch?  It seems reasonable and safe to me, but you never know!
I've always found the relationship between shell start-up scripts to be
confusing; everyone seems to want to configure them differently.

-- 
Chris

Attachment: 0001-system-Rename-.zlogin-to-.zprofile.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]