X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:content-type:mime-version:subject:from
	:in-reply-to:date:content-transfer-encoding:message-id
	:references:to; q=dns; s=default; b=YGokZEvskbqlE5E27RzOO5bZ4601
	f/tB81RaVgyPmzwDpQcRDFiBPPXTrYP/LqWr6XX30wak5VVxyB+Vbr8ttwpUtWjo
	+xJCzl41MTl9MZYB3SGMq9Lkkvd8ORzFBfq28OigyfSaAokniNKu1wwT8ZelqJzc
	KoOHRH5FG7Yzb2U=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:content-type:mime-version:subject:from
	:in-reply-to:date:content-transfer-encoding:message-id
	:references:to; s=default; bh=Va1bcxpgdlHo14MVKhk/sFDUC44=; b=CU
	qMWTXNDAkOPdc/ERcY441QxJoje1DTPx4j48+3GciKbfJxjINYBq3SWggSD/8+Oz
	q9LN9NAV3j0MkaBFIvP0WFewTSu8ExTiMpoNwDdABAzLJoc8RwXK6xdlaYHNy6Zn
	t71ru7BE6DyJ5jHcdmoGCRZbwrh88ZdPotAAY+QxU=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.4 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=stromeko@nexgo.de, stromekonexgode, D*nexgo.de, U*stromeko
X-HELO: etr-usa.com
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
Subject: Re: Change PS1 when run as administrator
From: Warren Young <wyml@etr-usa.com>
In-Reply-To: <87d1qv37uj.fsf@Rainer.invalid>
Date: Tue, 15 Mar 2016 13:23:20 -0600
Message-Id: <BE1B9660-2A27-44FE-9396-18EBC3BF6E2A@etr-usa.com>
References: <F7CDFE45-BFA7-4599-B510-B40BCA19142F@etr-usa.com> <87d1qv37uj.fsf@Rainer.invalid>
To: The Cygwin Mailing List <cygwin@cygwin.com>
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u2FJNb5d009231

On Mar 15, 2016, at 12:37 PM, Achim Gratz <Stromeko@nexgo.de> wrote:
> 
> Warren Young writes:
> 
>> Perhaps something like this should go into the default /etc/profile?
> 
> No, since it gets read for all shells, not just interactive ones.

Not according to the INVOCATION section of bash.1.  It only talks about /etc/profile in the context of login shells.

Proof:

    $ echo 'echo re-sourced /etc/profile' >> /etc/profile
    $ bash
    $ ( ls )

> you can always
> place a script to that effect into /etc/profile.d if you absolutely want
> it there anyway.

I’ve been putting it in .bash_profile, which, like /etc/profile, is only sourced once when an interactive shell is started.

It would just be nice not to have to make this local tweak on every Cygwin installation.

Even if you don’t like my green -> red change, I do think the default PS1 should switch from $ to # when run as admin.

> I think putting these in the ENV file is preferrable.

I don’t know what you mean by that.


--
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


