Here's a hopefully uncontroversial patch that sets PS1 in 'guix
environment' containers to something more friendly than what bash shows
by default when PS1 is unset.  OK to push?

>From 10741ce4e09c5990e70c94f5ed650b3561d042a0 Mon Sep 17 00:00:00 2001
From: David Thompson <dthomps...@worcester.edu>
Date: Sun, 27 Mar 2016 21:20:19 -0400
Subject: [PATCH] environment: Set a default value for PS1.

* guix/scripts/environment.scm (launch-environment/container): Set PS1
  during container initialization.
---
 guix/scripts/environment.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index fc75d78..6aa5ad0 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -425,6 +425,9 @@ host file systems to mount inside the container."
             (mkdir-p "/bin")
             (symlink bash "/bin/sh")
 
+            ;; Set a reasonable default PS1.
+            (setenv "PS1" "[ENV] \\u@\\h \\w\\$ ")
+
             ;; Setup directory for temporary files.
             (mkdir-p "/tmp")
             (for-each (lambda (var)
-- 
2.7.3

-- 
David Thompson

Reply via email to