Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Array parameter for supplementary groups?
- X-seq: zsh-users 15716
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Array parameter for supplementary groups?
- Date: Tue, 18 Jan 2011 13:27:53 -0500 (EST)
- 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
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:)
running as normal:
uid=12522(bhaskell) gid=10513(Domain Users) groups=10513(Domain Users),545(Users)
running as admin:
uid=12522(bhaskell) gid=10513(Domain Users) groups=10513(Domain Users),0(root),544(Administrators),545(Users)
(I just dislike parsing when it's not necessary.)
--
Best,
Ben
Messages sorted by:
Reverse Date,
Date,
Thread,
Author