unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Meiyo Peng <meiyo.peng@gmail.com>
To: cmmarusich@gmail.com
Cc: guix-devel@gnu.org
Subject: Re: move "source /etc/profile" from .zlogin to .zprofile
Date: Sun, 14 Oct 2018 03:14:08 +0000	[thread overview]
Message-ID: <CADCc2gFgx16WEAG5kWnnPuN1MmBhUs3namRJoZX_DLNE_LbSdA@mail.gmail.com> (raw)
In-Reply-To: <87sh198g6w.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

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 <cmmarusich@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.
>
>

[-- Attachment #2: Type: text/html, Size: 2331 bytes --]

      parent reply	other threads:[~2018-10-14  3:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-13 15:44 move "source /etc/profile" from .zlogin to .zprofile Meiyo Peng
2018-10-14  1:33 ` Chris Marusich
2018-10-14  1:56   ` Leo Famulari
2018-10-14  6:30     ` Chris Marusich
2018-10-14  7:58       ` Meiyo Peng
2018-10-15  9:48       ` Ludovic Courtès
2018-10-16  4:59         ` Leo Famulari
2018-10-16 11:55           ` Ludovic Courtès
2018-10-19  7:47             ` Chris Marusich
2018-10-14  3:14   ` Meiyo Peng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADCc2gFgx16WEAG5kWnnPuN1MmBhUs3namRJoZX_DLNE_LbSdA@mail.gmail.com \
    --to=meiyo.peng@gmail.com \
    --cc=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).