From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15024 invoked by alias); 18 Jan 2011 20:04:37 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15717 Received: (qmail 15712 invoked from network); 18 Jan 2011 20:04:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at dan.emsphone.com does not designate permitted sender hosts) Date: Tue, 18 Jan 2011 13:46:53 -0600 From: Dan Nelson To: "Benjamin R. Haskell" Cc: Zsh Users Subject: Re: Array parameter for supplementary groups? Message-ID: <20110118194653.GK75125@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 8.2-PRERELEASE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.96.4 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Tue, 18 Jan 2011 13:46:54 -0600 (CST) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 In the last episode (Jan 18), Benjamin R. Haskell said: > Is there an array parameter for the group IDs of the current user? Am I > overlooking it? > > Under Cygwin under Windows 7, right-click run-as-administrator adds some > supplementary groups, but the user is otherwise indistinguishable, > AFAICT. I'd like to be able to do something like: > > (( $+groups[(Re)0] )) && { do stuff for admin-style prompt } > > without resorting to parsing the output of `id`. (examples:) Parsing the output of "groups" or "id -G" is simpler, btw. A builtin with this info would be nice, though :) -- Dan Nelson dnelson@allantgroup.com