Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Array parameter for supplementary groups?
- X-seq: zsh-users 15717
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- Subject: Re: Array parameter for supplementary groups?
- Date: Tue, 18 Jan 2011 13:46:53 -0600
- Cc: Zsh Users <zsh-users@xxxxxxx>
- In-reply-to: <alpine.LNX.2.01.1101181317380.2792@hp>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <alpine.LNX.2.01.1101181317380.2792@hp>
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@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author