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 /gnu | |
parent | 50500f7cf0786cccb8211ddac75a56c3c82859f6 (diff) | |
download | 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 'gnu')
-rw-r--r-- | gnu/system/shadow.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index aa97652678..ae6229229b 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -153,7 +153,13 @@ then source /etc/profile fi -PS1='\\u@\\h \\w\\$ ' +# Adjust the prompt depending on whether we're in 'guix environment'. +if [ -n \"$GUIX_ENVIRONMENT\" ] +then + export PS1='\\u@\\h \\w\\ [env]$ ' +else + export PS1='\\u@\\h \\w\\$ ' +fi alias ls='ls -p --color' alias ll='ls -l'\n")) (zlogin (text-file "zlogin" "\ |