From: ludo@gnu.org (Ludovic Courtès)
To: David Thompson <dthompson2@worcester.edu>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] scripts: Add 'environment' command.
Date: Sat, 11 Oct 2014 23:52:38 +0200 [thread overview]
Message-ID: <87d29y6zq1.fsf@gnu.org> (raw)
In-Reply-To: <87oati3i79.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Sat, 11 Oct 2014 08:27:06 -0400")
David Thompson <dthompson2@worcester.edu> 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’.
next prev parent reply other threads:[~2014-10-11 21:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 22:48 [PATCH] scripts: Add 'environment' command David Thompson
2014-10-09 6:44 ` Alex Kost
2014-10-09 16:50 ` Eric Bavier
2014-10-09 16:54 ` Thompson, David
2014-10-09 17:26 ` Eric Bavier
2014-10-09 19:30 ` Ludovic Courtès
2014-10-10 2:32 ` David Thompson
2014-10-10 12:09 ` David Thompson
2014-10-10 16:37 ` Ludovic Courtès
2014-10-10 18:09 ` David Thompson
2014-10-10 20:47 ` Ludovic Courtès
2014-10-10 22:16 ` David Thompson
2014-10-11 10:35 ` Ludovic Courtès
2014-10-11 12:27 ` David Thompson
2014-10-11 21:52 ` Ludovic Courtès [this message]
2014-10-12 4:43 ` Setting environment variables in .bashrc vs .bash_profile Mark H Weaver
2014-10-12 21:10 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d29y6zq1.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=dthompson2@worcester.edu \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).