This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: base-files-4.2-3 : attention maintainer
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Ken Brown <kbrown at cornell dot edu>, cygwin at cygwin dot com
- Date: Sat, 26 Sep 2015 12:11:18 +0300
- Subject: Re: base-files-4.2-3 : attention maintainer
- Authentication-results: sourceware.org; auth=none
- References: <BLU182-W10FB6B21A2AEC90F71470FD4450 at phx dot gbl> <560407A6 dot 40206 at gmail dot com> <87io6z3euv dot fsf at Rainer dot invalid> <5605983C dot 8060909 at cornell dot edu>
- Reply-to: cygwin at cygwin dot com
Greetings, Ken Brown!
> As long as you're updating base-files anyway, maybe you could implement
> one of the previously-discussed proposals for showing a prompt of "#"
> instead of "$" in shells with sufficient privileges. Unfortunately, I
> don't remember if there was ever a consensus reached on exactly how that
> should be done.
Something to this extent?
PS1_TAIL="$(
x="$"
for group in $(id -G); do
{
test $group -eq 114 && { x="#"; break; }
test $group -eq 544 && { x="#"; break; }
test $group -eq 0 && { x="Please remove well-known SID overrides from your /etc/group file#"; break; }
}
done
echo $x
)"
if [ "$color_prompt" = yes ]; then
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\007\]\n$PS1_TAIL '
else
PS1='\u@\h:\w\007\n$PS1_TAIL '
fi
unset color_prompt force_color_prompt
--
With best regards,
Andrey Repin
Saturday, September 26, 2015 12:07:50
Sorry for my terrible english...
--
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