This is the mail archive of the
mailing list for the Cygwin project.
Re: Change PS1 when run as administrator
- From: Warren Young <wyml at etr-usa dot com>
- To: The Cygwin Mailing List <cygwin at cygwin dot com>
- Date: Tue, 15 Mar 2016 13:23:20 -0600
- Subject: Re: Change PS1 when run as administrator
- Authentication-results: sourceware.org; auth=none
- References: <F7CDFE45-BFA7-4599-B510-B40BCA19142F at etr-usa dot com> <87d1qv37uj dot fsf at Rainer dot invalid>
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.
$ echo 'echo re-sourced /etc/profile' >> /etc/profile
$ ( 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
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple