Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: _groups and _condition



Sorry, I yet again forgot to turn off word-wrap before sending a patch.

Oliver

--- Completion/User/_groups.bak	Thu Feb 17 17:52:19 2000
+++ Completion/User/_groups	Sun Mar 12 07:18:55 2000
@@ -1,13 +1,13 @@
 #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: :)$(ypcat group.byname)}%%:*}} # If you use YP
+      if (( ${+commands[ypcat]} )) && tmp=$(ypcat group.byname); then
+        : ${(A)_cache_groups:=${${(f)tmp}%%:*}} # If you use YP
       else
         : ${(A)_cache_groups:=${${(s: :)$(</etc/group)}%%:*}}
       fi
--- Compoletion/Base/_condition.bak	Sun Mar 12 06:42:06 2000
+++ Compoletion/Base/_condition	Sun Mar 12 06:46:23 2000
@@ -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'



Messages sorted by: Reverse Date, Date, Thread, Author