delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/03/15/15:23:41

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT nexgo DOT de, stromekonexgode, D*nexgo.de, U*stromeko
X-HELO: etr-usa.com
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
Subject: Re: Change PS1 when run as administrator
From: Warren Young <wyml AT etr-usa DOT 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 AT etr-usa DOT com> <87d1qv37uj DOT fsf AT Rainer DOT invalid>
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u2FJNb5d009231

On Mar 15, 2016, at 12:37 PM, Achim Gratz <Stromeko AT nexgo DOT 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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019