From eaa55b546134c5adf461f485d4ab388df2b6ea8b Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 13 Mar 2000 01:55:02 +0000 Subject: zsh-workers/10099 --- Completion/Base/_condition | 2 +- Completion/User/_groups | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Completion/Base/_condition b/Completion/Base/_condition index 51ac6bf0d..5e599a53c 100644 --- a/Completion/Base/_condition +++ b/Completion/Base/_condition @@ -4,7 +4,7 @@ local prev="$words[CURRENT-1]" 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' diff --git a/Completion/User/_groups b/Completion/User/_groups index b4ecab38c..185b06549 100644 --- a/Completion/User/_groups +++ b/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: :)$(