Hi Pierre,

Pierre Neidhardt <m...@ambrevar.xyz> writes:

> Danny Milosavljevic <dan...@scratchpost.org> writes:
>
>> On Thu, 24 Oct 2019 11:32:55 +0200
>> Pierre Neidhardt <m...@ambrevar.xyz> wrote:
>>
>>>- The inverse command, =guix deactivate /path/to/profile=.
>>> This can be useful to deactivate a profile that was activated during login.
>>
>> That is not composable and sounds like a HUGE effort for what would otherwise
>> one "exit" command.
>
> Why isn't it composable?
>
> It does not seem too hard: if I'm not mistaken, it boils down to
> removing all environment entries that match a given profile.

It wouldn't be sufficient to remove them.  You'd have to restore the
previous settings.  For example, if we remove the settings for PATH,
MANPATH, etc, without restoring the previous settings, I doubt that you
would be pleased with the results.

It seems to me that the most natural approach to allow restoring the
previous environment settings is to launch a subshell when you activate
a profile.  That subshell can then simply be exited to restore the
previous settings.

Does that make sense?

      Regards,
        Mark

Reply via email to