From: Saku Laesvuori via Guix-patches via <guix-patches@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 64765@debbugs.gnu.org, 宋文武 <iyzsong@envs.net>
Subject: [bug#64765] [PATCH] gnu: home: zsh: Also load enviroment in non-login shells
Date: Thu, 17 Aug 2023 10:36:40 +0300 [thread overview]
Message-ID: <20230817073640.kowdgkn7fz3tatho@X-kone> (raw)
In-Reply-To: <87sf8i3e8j.fsf_-_@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
> >> 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. :-))
It could be avoided properly by making guix-generated
profiles ensure that they can't be sourced multiple times
(e.g. [ -z "$GUIX_PROFILE_SOURCED" ] || return ; GUIX_PROFILE_SOURCED=1).
The specific problem I was facing was with running commands with ssh,
which the bash service seems to fix by sourcing /etc/profile from bashrc
when used via ssh. I'll send a patch for this ssh-specific solution but
I'm not sure if it's the best way to fix this.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-08-17 7:37 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
2023-08-17 7:36 ` Saku Laesvuori via Guix-patches via [this message]
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=20230817073640.kowdgkn7fz3tatho@X-kone \
--to=guix-patches@gnu.org \
--cc=64765@debbugs.gnu.org \
--cc=iyzsong@envs.net \
--cc=ludo@gnu.org \
--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).