diff mbox series

[bug#60365,3/4] environment: Simplify 'PS1' suggestion on '--check'.

Message ID 20221227212618.18063-3-ludo@gnu.org
State New
Headers show
Series Rationalize 'PS1' handling in home, system, and shell | expand

Commit Message

Ludovic Courtès Dec. 27, 2022, 9:26 p.m. UTC
* guix/scripts/environment.scm (validate-child-shell-environment): In
'PS1' suggestion, remove 'export' and avoid 'if'.
---
 guix/scripts/environment.scm | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index ab11b35335..bdbfa03fcf 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -610,10 +610,7 @@  (define-syntax-rule (warn exp ...)
 @file{~/.bashrc}:
 
 @example
-if [ -n \"$GUIX_ENVIRONMENT\" ]
-then
-  export PS1=\"\\u@@\\h \\w [env]\\$ \"
-fi
+PS1='\\u@@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ '
 @end example
 "))))))