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:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; q=dns; s=default; b=DXLqFoN q4EggNAyffCaIs5p5qH+rs1TlyGjyqqETDrro9OcUEE7R0plg4ECT/ltWH4MKHoq yxmxagD3wBssV4QjeiSH0ETtcMbjYtMem1J/RkbDhojlhAPYAuDdLtAMp4OqmTVn HqxO0rt4X0h39j4v21MRrrzI0Ozj/inn4AmI= 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:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=default; bh=3isqiNAMdxNF2 8Renb9gmpv1IZk=; b=MkT/3qH7TgsJUxdXRKlFH5YhK5cpI/x/OzHOb0rE7MeR7 QCNTR4FL5sZ0FmXORtjbARu+ykzBRJe7lP44MyuhYLdciZ5XqJ45HKDSqhiUiuwL NxSM2v5/Dp505XBreE3hob1kaYQ4vbg+8Q7BeOels6ApyxfaYr2hLIraIY38mk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=0.1 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.3.2 X-HELO: s87.webhostingserver.nl X-Received: by 10.152.199.39 with SMTP id jh7mr15355769lac.18.1402949123588; Mon, 16 Jun 2014 13:05:23 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <874mzkptd2.fsf@Rainer.invalid> References: <874mzkptd2 DOT fsf AT Rainer DOT invalid> From: Frank Fesevur Date: Mon, 16 Jun 2014 22:04:53 +0200 Message-ID: Subject: Re: Change PS1 when running as administrator To: "cygwin AT cygwin DOT com" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes 2014-06-16 21:06 GMT+02:00 Achim Gratz: > Frank Fesevur writes: >> When I run as administrator I change my PS1 from "$" to "#" with these >> line in ~/.bashrc. >> >> if id -Gn | grep -i Administrators > /dev/null > > If anything I'd check for membership in group 544. "Administrators" > surely is one of these strings that gets localized depending on the > phase of the moon or something. I can't look right now, but I'm pretty > sure it says "Administratoren" in a german Windows version. On all my Dutch Windows all group names are localized apart from 544/Administrators. # id uid=1000(Frank) gid=513(Geen) groups=513(Geen),0(root),544(Administrators),545(Gebruikers) But I agree checking the numeric value is better. >> If more people like this idea, maybe it could included in /etc/bash.bashrc? > > I'll have to think about it, but I lean toward putting it into profile.d > instead. Thanks for considering. The other PS1 setting (user AT host dir) is also in bash.bashrc. That's why I suggested bash.bashrc. Regards, Frank -- 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