From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26146 invoked from network); 23 Jun 2008 18:53:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Jun 2008 18:53:21 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 64560 invoked from network); 23 Jun 2008 18:53:06 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Jun 2008 18:53:06 -0000 Received: (qmail 19116 invoked by alias); 23 Jun 2008 18:52:54 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12986 Received: (qmail 19101 invoked from network); 23 Jun 2008 18:52:54 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 23 Jun 2008 18:52:54 -0000 Received: from pepin.polanet.pl (pepin.quarto.pl [193.34.52.2]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 5284380524FD for ; Mon, 23 Jun 2008 20:52:51 +0200 (CEST) Received: by pepin.polanet.pl (Postfix, from userid 1090) id 88DFF44B45; Mon, 23 Jun 2008 20:52:49 +0200 (CEST) Date: Mon, 23 Jun 2008 20:52:49 +0200 From: Tomasz Pala To: zsh-users@sunsite.dk Subject: Re: completion for ipset Message-ID: <20080623185249.GA26138@pepin.polanet.pl> References: <20080529123042.GA24187@pepin.polanet.pl> <20080623170935.GA7408@pepin.polanet.pl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <20080623170935.GA7408@pepin.polanet.pl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV 0.92.1/7542/Mon Jun 23 18:42:14 2008 on bifrost X-Virus-Status: Clean --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline And updated arp completion (handles more options). -- Tomasz Pala --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: attachment; filename=_arp #compdef arp local state line expl curcontext="$curcontext" local -a cmds cmds=(-a --display -d --delete -s --set -f --file) _arguments -C \ "($cmds 1 -D --use-device)"{-a,--display}'[show entries for all or specified hosts]:host:->hostintable' \ "($cmds 1 -n --numeric -D --use-device -H --hw-type)"{-d,--delete}'[delete entry from table]:host:->hostintable' \ "($cmds 1 -n --numeric)"{-s,--set}'[create an ARP entry]:host:_hosts:ethernet address::*:option:(temp trail pub)' \ "($cmds 1 -n --numeric)"{-f,--file}'[read multiple entries from file]:file:_files' \ '(-i --device)'{-i,--device}'[Select an interface]:::_net_interfaces:' \ '(-D --use-device -a --display -d --delete)'{-D,--use-device}"[Use the interface ifa's hardware address]" \ '(-H --hw-type -d --delete)'{-H,--hw-type}'[class of entries to check for]:class:(ether arcnet pronet ax25 netrom)' \ '(-n --numeric -d --delete -s --set -f --file)'{-n,--numeric}'[shows numerical addresses]' \ '(-v --verbose)'{-v,--verbose}'[be verbose]' \ '(-a)1:host:->hostintable' [[ "$state" = hostintable ]] && _wanted hosts expl 'host' compadd ${${${(f)"$(${words[1]} -an)"}##[ ?(]#}%%[ )]*} --qDbXVdCdHGoSgWSk--