summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-01 14:39:14 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-01 23:29:49 +0200
commit28de8d258b30f887053d43b2d75a7ed5e2fa2adc (patch)
treeed0cb7f5c487d7d93bfc5e11472eac0ea81f2443 /doc
parent50500f7cf0786cccb8211ddac75a56c3c82859f6 (diff)
environment: Define 'GUIX_ENVIRONMENT'.
* guix/scripts/environment.scm (create-environment): Define 'GUIX_ENVIRONMENT'. * doc/guix.texi (Invoking guix environment): Document it. * gnu/system/shadow.scm (default-skeletons): Adjust 'PS1' depending on whether 'GUIX_ENVIRONMENT' is defined.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index a35ea2fd9d4..fdd8fdf9aee 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4146,6 +4146,19 @@ variables in @file{.bashrc}; instead, they should be defined in
4146@xref{Bash Startup Files,,, bash, The GNU Bash Reference Manual}, for 4146@xref{Bash Startup Files,,, bash, The GNU Bash Reference Manual}, for
4147details on Bash start-up files.}. 4147details on Bash start-up files.}.
4148 4148
4149@vindex GUIX_ENVIRONMENT
4150@command{guix environment} defines the @code{GUIX_ENVIRONMENT}
4151variable in the shell it spaws. This allows users to, say, define a
4152specific prompt for development environments in their @file{.bashrc}
4153(@pxref{Bash Startup Files,,, bash, The GNU Bash Reference Manual}):
4154
4155@example
4156if [ -n "$GUIX_ENVIRONMENT" ]
4157then
4158 export PS1="\u@@\h \w [dev]\$ "
4159fi
4160@end example
4161
4149Additionally, more than one package may be specified, in which case the 4162Additionally, more than one package may be specified, in which case the
4150union of the inputs for the given packages are used. For example, the 4163union of the inputs for the given packages are used. For example, the
4151command below spawns a shell where all of the dependencies of both Guile 4164command below spawns a shell where all of the dependencies of both Guile