From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: Profiles/manifests-related command line interface enhancements Date: Thu, 24 Oct 2019 05:00:43 -0400 Message-ID: <87d0emwm95.fsf@netris.org> References: <87mudrxvs8.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42676) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNZ0K-0006Tx-93 for guix-devel@gnu.org; Thu, 24 Oct 2019 05:02:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNZ0J-00071L-7N for guix-devel@gnu.org; Thu, 24 Oct 2019 05:02:00 -0400 Received: from world.peace.net ([64.112.178.59]:57102) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNZ0J-0006vp-3u for guix-devel@gnu.org; Thu, 24 Oct 2019 05:01:59 -0400 In-Reply-To: <87mudrxvs8.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Wed, 23 Oct 2019 18:37:43 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Pierre Neidhardt Cc: guix-devel@gnu.org Hi Pierre, Pierre Neidhardt writes: > While playing with multiple profiles and manifests and discussing with > a couple of people in the community, I collected a number of usability > issues with Guix when it comes to managing multiple profiles and dealing > with manifests. > > Ideas for new features, more or less from most important to least > important: > > - Activate a profile with =guix activate /path/to/profile=. > Right now, the most appropriate way to activate a profile is > > GUIX_PROFILE="$profile" ; . "$profile"/etc/profile Due to the way environment variables work, there's no way to implement your proposed interface, at least not without changing 'guix' from a normal program into a Bash shell function. Programs are unable to change the environment variable settings of the parent shell that launched them. However, we could provide a Bash shell function (with a different name) that provides conveniences like this. Users of other shells would not be able to use the Bash shell function, though. Ideally, we'd provide shell functions with a similar interface for several popular shells. I'm not sure if it's worth it, but it could be done. Thanks, Mark