[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: Add direnv
From: |
宋文武 |
Subject: |
Re: [PATCH] gnu: Add direnv |
Date: |
Wed, 14 Sep 2016 15:49:21 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Christopher Baines <address@hidden> writes:
> 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.
Cool, applied, thanks!