From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14599 invoked from network); 12 Mar 2000 22:34:17 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 12 Mar 2000 22:34:17 -0000 Received: (qmail 28614 invoked by alias); 12 Mar 2000 22:34:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10099 Received: (qmail 28595 invoked from network); 12 Mar 2000 22:34:10 -0000 From: "Bart Schaefer" Message-Id: <1000312223401.ZM31053@candle.brasslantern.com> Date: Sun, 12 Mar 2000 22:34:01 +0000 In-Reply-To: <38CBB81A.EC87E0AA@u.genie.co.uk> Comments: In reply to Oliver Kiddle "Re: PATCH: _groups and _condition" (Mar 12, 3:30pm) References: <38CBB634.816D2213@u.genie.co.uk> <38CBB81A.EC87E0AA@u.genie.co.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: Oliver Kiddle , Zsh workers Subject: Re: PATCH: _groups and _condition MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 12, 3:30pm, Oliver Kiddle wrote: } Subject: Re: PATCH: _groups and _condition } } Sorry, I yet again forgot to turn off word-wrap before sending a patch. Your _groups is out of date -- my copy of _groups has ... $(_call groups ypcat group.byname) ... And: } --- Compoletion/Base/_condition.bak Sun Mar 12 06:42:06 2000 } +++ Compoletion/Base/_condition Sun Mar 12 06:46:23 2000 ^^^ I don't have this directory. :-) Here's a cleaned-up patch. I don't have ypcat, so I can't test it ... Index: Completion/Base/_condition =================================================================== @@ -4,7 +4,7 @@ if [[ "$prev" = -o ]]; then _tags -C -o options && _options -elif [[ "$prev" = -([no]t|ef) ]]; then +elif [[ "$prev" = -([a-hkprsuwxLOGSN]|[no]t|ef) ]]; then _tags -C "$prev" files && _files else _alternative 'files:: _files' 'parameters:: _parameters' Index: Completion/User/_groups =================================================================== @@ -1,13 +1,14 @@ #compdef newgrp -local expl groups +local expl groups tmp _wanted groups expl group || return 1 if ! zstyle -a ":completion:${curcontext}:" groups groups; then (( $+_cache_groups )) || - if (( ${+commands[ypcat]} )); then - : ${(A)_cache_groups:=${${(s: :)$(_call groups ypcat group.byname)}%%:*}} # If you use YP + if (( ${+commands[ypcat]} )) && + tmp=$(_call groups ypcat group.byname); then + : ${(A)_cache_groups:=${${(f)tmp}%%:*}} # If you use YP else : ${(A)_cache_groups:=${${(s: :)$(