about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/_condition2
-rw-r--r--Completion/User/_groups7
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: :)$(</etc/group)}%%:*}}
       fi