From a2638f9d57514116b85649bd78c38b57815382ee Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 18 Feb 2004 12:45:24 +0000 Subject: 19436: complete more things from nis --- Completion/Unix/Type/_groups | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Completion/Unix/Type/_groups') diff --git a/Completion/Unix/Type/_groups b/Completion/Unix/Type/_groups index bbb80868b..b6d599c28 100644 --- a/Completion/Unix/Type/_groups +++ b/Completion/Unix/Type/_groups @@ -6,11 +6,14 @@ _tags groups || return 1 if ! zstyle -a ":completion:${curcontext}:" groups groups; then (( $+_cache_groups )) || - if (( ${+commands[ypcat]} )) && - tmp=$(_call_program groups ypcat group.byname 2>/dev/null); then - : ${(A)_cache_groups:=${${(f)tmp}%%:*}} # If you use YP + if (( ${+commands[getent]} )); then + : ${(A)_cache_groups:=${${(s: :)$(_call_program groups getent group 2>/dev/null)}%%:*}} else - : ${(A)_cache_groups:=${${(s: :)$(/dev/null); then + _cache_groups+=( ${${(f)tmp}%%:*} ) # If you use YP + fi fi groups=( "$_cache_groups[@]" ) -- cgit 1.4.1