Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Array parameter for supplementary groups?



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