[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] scripts: Add 'environment' command.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] scripts: Add 'environment' command. |
Date: |
Sat, 11 Oct 2014 23:52:38 +0200 |
User-agent: |
Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux) |
David Thompson <address@hidden> skribis:
> I don't think it's something "wrong" with your files, really, but it is
> incompatible with the way 'guix environment' currently operates.
>
> I took another look at nix-build to see how they do things. They create
> a bashrc file in a temporary directory and run bash (or whatever
> $NIX_BUILD_SHELL is) with the '--rcfile' flag so that the user's bashrc
> isn't used. We could do something similar, but right now I don't have
> any reason to believe that all shells accept an '--rcfile' option, so it
> could easily break other setups.
POSIX specifies the ‘ENV’ environment variable for that:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html
So that’s one thing that could be used. Apparently Bash checks
‘BASH_ENV’ instead, unless invoked as ‘sh’ (info "(bash) Bash Startup
Files").
In the longer run, another option would be to have a Bash built-in
command, in the form of a plug-in loaded with ‘enable FOO.so’, that
would modify the environment variables of the running Bash process
(recutils has an example of that.)
My 2¢,
Ludo’.
- Re: [PATCH] scripts: Add 'environment' command., (continued)
- Re: [PATCH] scripts: Add 'environment' command., Ludovic Courtès, 2014/10/09
- Re: [PATCH] scripts: Add 'environment' command., David Thompson, 2014/10/09
- Re: [PATCH] scripts: Add 'environment' command., David Thompson, 2014/10/10
- Re: [PATCH] scripts: Add 'environment' command., Ludovic Courtès, 2014/10/10
- Re: [PATCH] scripts: Add 'environment' command., David Thompson, 2014/10/10
- Re: [PATCH] scripts: Add 'environment' command., Ludovic Courtès, 2014/10/10
- Re: [PATCH] scripts: Add 'environment' command., David Thompson, 2014/10/10
- Re: [PATCH] scripts: Add 'environment' command., Ludovic Courtès, 2014/10/11
- Re: [PATCH] scripts: Add 'environment' command., David Thompson, 2014/10/11
- Re: [PATCH] scripts: Add 'environment' command.,
Ludovic Courtès <=
- Setting environment variables in .bashrc vs .bash_profile, Mark H Weaver, 2014/10/12
- Re: Setting environment variables in .bashrc vs .bash_profile, Ludovic Courtès, 2014/10/12