delorie.com/archives/browse.cgi | search |
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:message-id:date:from:mime-version:to:subject | |
:references:in-reply-to:content-type:content-transfer-encoding; | |
q=dns; s=default; b=W8BpwSkxaRbzKKuYaMB+zm0TAwu6XEurzx0bnreBR0M | |
L7QWYrKYzS2EUxV8+fWWI40bJXcdZk/QNDlL39hAcjSTn3YG+W0ApMEXRu4wizVW | |
jXatFgxygnVLuqYB/2idzVj05wCuK6ZSZe7g9rIRBiPqsc1hJm9oZOAoC5ujB7IE | |
= | |
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:message-id:date:from:mime-version:to:subject | |
:references:in-reply-to:content-type:content-transfer-encoding; | |
s=default; bh=WB9ny+Tvjuv2hW2CiiNeunYnSQU=; b=GxHnVUAgKxL5OiYJw | |
/mUzjulh2n+UYEzyzrdrONZmRdDTmn9leTFD44M5xOrj+QjcSLs13jBrXuae4RL+ | |
/MzwsL4E4Fiw/Txzms5YvdhQRy1TETpNhR0fbMVIiFjcRrfaH26zdsENfKFm377v | |
GphX5FXvm7561pVmG4PkoA1SmA= | |
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=-0.2 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 |
X-HELO: | mailout01.t-online.de |
Message-ID: | <53484B9F.4000300@t-online.de> |
Date: | Fri, 11 Apr 2014 22:07:59 +0200 |
From: | Christian Franke <Christian DOT Franke AT t-online DOT de> |
User-Agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 SeaMonkey/2.25 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: [PATCH] base-files-4.2-1: Change prompt if running with admin rights |
References: | <53458036 DOT 1010307 AT t-online DOT de> <877g6ys69r DOT fsf AT Rainer DOT invalid> <1187249515 DOT 20140410053930 AT yandex DOT ru> <534797B5 DOT 3080801 AT towo DOT net> |
In-Reply-To: | <534797B5.3080801@towo.net> |
X-IsSubscribed: | yes |
Thomas Wolff wrote: > I use this in .bashrc (to embed $rootmark in an ESC sequence in PS1 > later). > I think it doesn't have specific dependencies and also it's portable > (except the group names are Windows ones...). It's not portable because Windows default user/group names are localized. > if id | grep -e "gid=.*(root)" -e "gid=.*(Administrators)" > /dev/null > then rootmark="30;41"; dirmark=7 > elif id | grep -e "gid=.*(Power Users)" > /dev/null German Windows uses "Administratoren", "Hauptbenutzer", "Domänen-Admins', ... > then rootmark="30;43"; dirmark=7 > else rootmark=0; dirmark="33;44" > fi > > Also I embed [$SHLVL] in PS1 unless it's 0, just as a suggestion. Makes sense. I vote +1 for the base-file's /etc/bash.bashrc :-) Christian -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |