unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Saku Laesvuori <saku@laesvuori.fi>
Cc: 64765@debbugs.gnu.org, 宋文武 <iyzsong@envs.net>
Subject: [bug#64765] [PATCH] gnu: home: zsh: Also load enviroment in non-login shells
Date: Wed, 16 Aug 2023 22:48:44 +0200	[thread overview]
Message-ID: <87sf8i3e8j.fsf_-_@gnu.org> (raw)
In-Reply-To: <20230721144458.w3we4ve6oqw4m7pn@X-kone> (Saku Laesvuori's message of "Fri, 21 Jul 2023 17:44:58 +0300")

Hi,

Saku Laesvuori <saku@laesvuori.fi> skribis:

>> > * gnu/home/services/shells.scm (zsh-file-zshenv): Add snippet to source
>> > profiles.
>> > (zsh-file-zprofile): Remove profile sourcing snippet.
>> > (zsh-get-configuration-files): Always add .zshenv as it is never empty.
>> > Check that .zprofile is not empty before adding it.
>> > ---
>> > The service incorrectly assumed that shells are either login shells or
>> > started from another shell. For example, ssh with a command argument
>> > starts shells that aren't login shells nor started from another shell.
>> 
>> Hello, this looks reasonable to me, only one question:
>> Will ~/.guix-home/profile/etc/profile be sourced multiple times with
>> duplicated search-path entries?  (eg: check 'env' in 'zsh' in 'zsh').
>
> Yes, but I don't think it causes any problems aside from adding useless
> data to the environment. This could be prevented by exporting
> GUIX_PROFILE_SOURCED=1 or something similar and only sourcing profiles
> if it isn't set.

I doesn’t sound great though, and I’m sure it could break obscure
things, like #include_next in C.

Is there a way this could be avoided?  (I’m not familiar with Zsh so I’m
not offering to help; just looking for pending patches to apply.  :-))

Thanks,
Ludo’.




  reply	other threads:[~2023-08-16 20:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 10:51 [bug#64765] [PATCH] gnu: home: zsh: Also load enviroment in non-login shells Saku Laesvuori via Guix-patches via
2023-07-21 12:42 ` 宋文武 via Guix-patches via
2023-07-21 14:44   ` Saku Laesvuori via Guix-patches via
2023-08-16 20:48     ` Ludovic Courtès [this message]
2023-08-17  7:36       ` Saku Laesvuori via Guix-patches via
2023-08-17  7:38 ` [bug#64765] [PATCH v2] gnu: home: zsh: Load environment when running via ssh Saku Laesvuori via Guix-patches via
2023-09-17 13:10   ` bug#64765: [PATCH] gnu: home: zsh: Also load enviroment in non-login shells Ludovic Courtès

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=87sf8i3e8j.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=64765@debbugs.gnu.org \
    --cc=iyzsong@envs.net \
    --cc=saku@laesvuori.fi \
    /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).