all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] environment: Set a default value for PS1.
@ 2016-03-28  1:22 David Thompson
  2016-03-28 16:39 ` Ludovic Courtès
  2016-03-30 13:28 ` Cyril Roelandt
  0 siblings, 2 replies; 6+ messages in thread
From: David Thompson @ 2016-03-28  1:22 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-environment-Set-a-default-value-for-PS1.patch --]
[-- Type: text/x-patch, Size: 943 bytes --]

From 10741ce4e09c5990e70c94f5ed650b3561d042a0 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@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


[-- Attachment #3: Type: text/plain, Size: 20 bytes --]


-- 
David Thompson

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-03-30 21:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-28  1:22 [PATCH] environment: Set a default value for PS1 David Thompson
2016-03-28 16:39 ` Ludovic Courtès
2016-03-30 13:10   ` Thompson, David
2016-03-30 13:28 ` Cyril Roelandt
2016-03-30 13:32   ` Thompson, David
2016-03-30 21:27     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.