guix-commits
[Top][All Lists]
Advanced

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

05/07: environment: Simplify 'PS1' suggestion on '--check'.


From: guix-commits
Subject: 05/07: environment: Simplify 'PS1' suggestion on '--check'.
Date: Thu, 5 Jan 2023 09:17:50 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 632e2f7ce19abf109945abf572ac3c22b50cf892
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Dec 27 22:00:39 2022 +0100

    environment: Simplify 'PS1' suggestion on '--check'.
    
    * 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 @@ If you are using Bash, you can do that by adding these 
lines to
 @file{~/.bashrc}:
 
 @example
-if [ -n \"$GUIX_ENVIRONMENT\" ]
-then
-  export PS1=\"\\u@@\\h \\w [env]\\$ \"
-fi
+PS1='\\u@@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ '
 @end example
 "))))))
 



reply via email to

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