[Top][All Lists]

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

Re: Adding a subcommand "load-profile"

From: Roel Janssen
Subject: Re: Adding a subcommand "load-profile"
Date: Wed, 29 Apr 2020 14:47:08 +0200
User-agent: Evolution 3.36.1 (3.36.1-1.fc32)

Dear Simon,

Thank you for your ideas!

On Tue, 2020-04-28 at 18:54 +0200, zimoun wrote:
> [...]
> > Would there be any interest from others to have this as well? And also, the
> > shell implementation heavy relies on Bash.  What other shells should I
> > attempt
> > to implement?
> It would be cool!
> However, if I remember correctly the previous discussion on such
> topic, the issue was to respect the user's shell ($SHELL). This
> argument is mitigated by the fact that "guix environment" already uses
> Bash to spawn the new shell, if I understand correctly.

I think we can respect the user's shell for the implementation of "load-
profile".  We could use Guile's "getenv" and "setenv" to prepare the shell
environment in Guile, and then spawn the $SHELL in such a way that it doesn't
load the user's default configuration.

> Well, I find annoying to not able to "go in" and "go out" in one
> profile and I prefer having a Bash specific implementation than
> nothing.
> So, thank you for the initiative. :-)
> > If there is interest in having this as a "load-profile" subcommand, I will
> > post
> > an initial implementation to the mailing list ASAP.
> Instead of another subcommand, I would suggest to add an option to
> "guix environment".
> Then an another further step should maybe combine "--load-profile" and
> "--ad-hoc" in order to create a temporary "augmented" profile.

I would strongly prefer to keep it backwards-compatible for our local HPC users.
Also, the "environment" command generates a new profile, whereas the proposed
"load-profile" merely applies the environment variables of an existing profile
to a newly spawned shell.  I think the way they work differs enough to warrant a
separate subcommand.

Kind regards,
Roel Janssen

reply via email to

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