diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-07-01 14:39:14 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-07-01 23:29:49 +0200 |
commit | 28de8d258b30f887053d43b2d75a7ed5e2fa2adc (patch) | |
tree | ed0cb7f5c487d7d93bfc5e11472eac0ea81f2443 /doc/guix.texi | |
parent | 50500f7cf0786cccb8211ddac75a56c3c82859f6 (diff) | |
download | guix-28de8d258b30f887053d43b2d75a7ed5e2fa2adc.tar guix-28de8d258b30f887053d43b2d75a7ed5e2fa2adc.tar.gz |
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/guix.texi')
-rw-r--r-- | doc/guix.texi | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index a35ea2fd9d..fdd8fdf9ae 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4146,6 +4146,19 @@ variables in @file{.bashrc}; instead, they should be defined in @xref{Bash Startup Files,,, bash, The GNU Bash Reference Manual}, for details on Bash start-up files.}. +@vindex GUIX_ENVIRONMENT +@command{guix environment} defines the @code{GUIX_ENVIRONMENT} +variable in the shell it spaws. This allows users to, say, define a +specific prompt for development environments in their @file{.bashrc} +(@pxref{Bash Startup Files,,, bash, The GNU Bash Reference Manual}): + +@example +if [ -n "$GUIX_ENVIRONMENT" ] +then + export PS1="\u@@\h \w [dev]\$ " +fi +@end example + Additionally, more than one package may be specified, in which case the union of the inputs for the given packages are used. For example, the command below spawns a shell where all of the dependencies of both Guile |