guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#60365] [PATCH 3/4] environment: Simplify 'PS1' suggestion on '--che


From: Ludovic Courtès
Subject: [bug#60365] [PATCH 3/4] environment: Simplify 'PS1' suggestion on '--check'.
Date: Tue, 27 Dec 2022 22:26:17 +0100

* 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 --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
 "))))))
 
-- 
2.38.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]