This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Change PS1 when run as administrator

On Mar 15, 2016, at 12:37 PM, Achim Gratz <> 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
    $ 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:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]