GNU bug report logs - #60365
[PATCH 0/4] Rationalize 'PS1' handling in home, system, and shell

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Tue, 27 Dec 2022 21:25:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 60365 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 60365 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [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





This bug report was last modified 2 years and 140 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.