From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] environment: Set a default value for PS1. Date: Wed, 30 Mar 2016 23:27:30 +0200 Message-ID: <874mbnac71.fsf@gnu.org> References: <87io07bdld.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <56FBD497.1080309@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alNeP-0004RR-QE for guix-devel@gnu.org; Wed, 30 Mar 2016 17:27:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alNeM-0002Ax-Jp for guix-devel@gnu.org; Wed, 30 Mar 2016 17:27:41 -0400 In-Reply-To: (David Thompson's message of "Wed, 30 Mar 2016 09:32:54 -0400") 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: "Thompson, David" Cc: guix-devel "Thompson, David" skribis: > On Wed, Mar 30, 2016 at 9:28 AM, Cyril Roelandt wrot= e: >> On 03/28/2016 03:22 AM, David Thompson wrote: >>> + ;; Set a reasonable default PS1. >>> + (setenv "PS1" "[ENV] \\u@\\h \\w\\$ ") >>> + >> Would it be an acceptable feature to let the user ask for their own PS1? >> I very often have to make sure my code works on both Python 2.7 and >> Python 3.4, and it would be very helpful to have environments named >> "(py27)" and "(py34)" instead of just "[ENV]". > > I should have made the commit message better. This change only > applies to containers. If you want to set your own PS1 there, source > a script in the container. Specifically, you can have something like this in ~/.bashrc (this is the default on GuixSD): --8<---------------cut here---------------start------------->8--- # Adjust the prompt depending on whether we're in 'guix environment'. if [ -n "$GUIX_ENVIRONMENT" ] then export PS1=3D'\u@\h \w [env]\$ ' else export PS1=3D'\u@\h \w\$ ' fi --8<---------------cut here---------------end--------------->8--- HTH! Ludo=E2=80=99.