summaryrefslogtreecommitdiffstats
path: root/Completion/User/_groups
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-13 01:55:02 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-13 01:55:02 +0000
commiteaa55b546134c5adf461f485d4ab388df2b6ea8b (patch)
treeb468903f4c4803961b9bda707e0addc8f098349c /Completion/User/_groups
parentzsh-workers/10098 (diff)
downloadzsh-eaa55b546134c5adf461f485d4ab388df2b6ea8b.tar
zsh-eaa55b546134c5adf461f485d4ab388df2b6ea8b.tar.gz
zsh-eaa55b546134c5adf461f485d4ab388df2b6ea8b.tar.bz2
zsh-eaa55b546134c5adf461f485d4ab388df2b6ea8b.tar.lz
zsh-eaa55b546134c5adf461f485d4ab388df2b6ea8b.tar.xz
zsh-eaa55b546134c5adf461f485d4ab388df2b6ea8b.tar.zst
zsh-eaa55b546134c5adf461f485d4ab388df2b6ea8b.zip
zsh-workers/10099
Diffstat (limited to 'Completion/User/_groups')
-rw-r--r--Completion/User/_groups7
1 files changed, 4 insertions, 3 deletions
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: :)$(</etc/group)}%%:*}}
fi