From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: [PATCH] environment: Set a default value for PS1. Date: Sun, 27 Mar 2016 21:22:54 -0400 Message-ID: <87io07bdld.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akLtU-0008Vy-I1 for guix-devel@gnu.org; Sun, 27 Mar 2016 21:23:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akLtP-00085X-SE for guix-devel@gnu.org; Sun, 27 Mar 2016 21:23:00 -0400 Received: from mail-qk0-x232.google.com ([2607:f8b0:400d:c09::232]:36764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akLtP-00085S-Mv for guix-devel@gnu.org; Sun, 27 Mar 2016 21:22:55 -0400 Received: by mail-qk0-x232.google.com with SMTP id i4so53697479qkc.3 for ; Sun, 27 Mar 2016 18:22:55 -0700 (PDT) Received: from izanagi (209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com. [209.6.40.86]) by smtp.gmail.com with ESMTPSA id t85sm8675349qki.10.2016.03.27.18.22.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Mar 2016 18:22:54 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain 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? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-environment-Set-a-default-value-for-PS1.patch >From 10741ce4e09c5990e70c94f5ed650b3561d042a0 Mon Sep 17 00:00:00 2001 From: David Thompson 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 --=-=-= Content-Type: text/plain -- David Thompson --=-=-=--