From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Baines Subject: [PATCH] gnu: Add direnv Date: Sat, 10 Sep 2016 17:39:32 +0100 Message-ID: <20160910163933.24468-1-mail@cbaines.net> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bilJg-00044B-2E for guix-devel@gnu.org; Sat, 10 Sep 2016 12:39:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bilJc-0000Ra-42 for guix-devel@gnu.org; Sat, 10 Sep 2016 12:39:44 -0400 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:35553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bilJb-0000RE-Uv for guix-devel@gnu.org; Sat, 10 Sep 2016 12:39:40 -0400 Received: from lucida (88-104-170-175.dynamic.dsl.as9105.com [88.104.170.175]) by mira.cbaines.net (Postfix) with ESMTPSA id 6CCD913D625 for ; Sat, 10 Sep 2016 17:39:37 +0100 (BST) Received: from chris by lucida with local (Exim 4.87) (envelope-from ) id 1bilJZ-0006gW-2m for guix-devel@gnu.org; Sat, 10 Sep 2016 17:39:37 +0100 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: guix-devel@gnu.org direnv is an environment switcher for the shell. direnv can be used with many tools, including Guix environments. I was lucky enough to meet the original author in London, who showed me direnv, and helped me write a function for my .direnvrc file to make it easy to use with Guix. I have the following in my .direnvrc file (in my home directory). use_guix() { eval "$(guix environment "$@" --search-paths)" } This means that I can have something like the following in my .envrc files use_guix --ad-hoc guile You need to add a shell hook, and "allow" this file, but after that is done, just changing in and out of the directory with the .envrc file in it will adjust the environmental variables in your shell.