X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.4 required=5.0	tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=google.com; s=20120113;        h=mime-version:x-originating-ip:from:date:message-id:subject:to         :content-type:content-transfer-encoding:x-gm-message-state;        bh=rryjWb9KKKcJPErodL0RM9D7GKPqfv4HwgUPbpcuP5k=;        b=YoQ4dASiwtYDQSHNk39cXULXlYwDHgAuBznceSK6DpgqyQtx8x2gimeYf0pqgowYPP         kEX+NpU1OjcpCsgEwYciRwab7QIjMHEEGewVcYOTTw7TpKm8ibZXQ/otN2lUsBF34taD         wn/o3o8ScJOZGqXqCBvDwAa/6gQ24lJGwPlaxeQ07jYhaDUyFEl6KjeRuOiWDWqvnA0C         ycZatASSlkT6kiv1Vc44Yx35GrdQJdiTyuS62qPLUDEpgsuaYPnmze7edrOf43Btm8la         qistyy/knvMkascs/tsMWTZ8SwXFzQW2370P9bNkLdxj8G2w3Fd22vOiAwXEVDTiXVrV         LNig==
MIME-Version: 1.0
From: David Caldwell <david@davidpcaldwell.com>
Date: Mon, 26 Mar 2012 16:40:31 +0100
Message-ID: <CAJ2Svn=behT0EJw2akH6E8DKPx38WMehhEghexQoKRSsGUaHuA@mail.gmail.com>
Subject: Proposed change to base-files /etc/bash.bashrc: see whether PS1 has already been set
To: cygwin <cygwin@cygwin.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Gm-Message-State: ALoCoQnZmca6PhP9TqawP7EOcP8vAG45Z5YQDNErVk4Rrkr2W7UGQcOeZ7Lw/Ek8c86zMhwSDpEA
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q2QFfHhu017970

I can't figure out where the CVS is for base-files, but I wanted to
propose that the file:

/etc/bash.bashrc

... be altered to test whether the PS1 variable has already been set
before setting it to the default.

I set mine in a file in the /etc/profile.d directory, but with the
standard Cygwin installation, this value is overwritten unless I
modify each user's local setup or alter the system-wide file.

It would be harmless to ignore already-set values in this situation.

I could obviously generate a patch as necessary if I knew where the
repository was, but it's a one-liner, basically:

if [ -z "$PS1" ]; then
        PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
fi

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


