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

Re: PATCH: new completion function for arp



Oliver Kiddle wrote:

> ...
> +
> +if [[ "$state" = hostintable ]]; then
> +  _wanted hosts expl 'host' compadd ${${${(f)"$(${words[1]} -a)"}##[ ?(]#}%%[ )]*}
> +fi
> +

This would return zero if _arguments returned non-zero without entering
the state.

Bye
 Sven

Index: Completion/User/_arp
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_arp,v
retrieving revision 1.1
diff -u -r1.1 _arp
--- Completion/User/_arp	2000/07/04 21:58:09	1.1
+++ Completion/User/_arp	2000/07/05 10:49:49
@@ -9,7 +9,6 @@
  '(-a -d -s 1)-f[read multiple entries from file]:file:_files' \
  '(-a)1:host:->hostintable' && return 0
 
-if [[ "$state" = hostintable ]]; then
+[[ "$state" = hostintable ]] &&
   _wanted hosts expl 'host' compadd ${${${(f)"$(${words[1]} -a)"}##[ ?(]#}%%[ )]*}
-fi
 

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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