From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4040 invoked from network); 26 Jul 2005 00:31:17 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Jul 2005 00:31:17 -0000 Received: (qmail 69773 invoked from network); 26 Jul 2005 00:31:11 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Jul 2005 00:31:11 -0000 Received: (qmail 24498 invoked by alias); 26 Jul 2005 00:31:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21526 Received: (qmail 24489 invoked from network); 26 Jul 2005 00:31:08 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Jul 2005 00:31:08 -0000 Received: (qmail 69497 invoked from network); 26 Jul 2005 00:31:08 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 26 Jul 2005 00:31:03 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 7FB4D70057; Mon, 25 Jul 2005 20:31:02 -0400 (EDT) Date: Mon, 25 Jul 2005 20:31:02 -0400 From: Clint Adams To: Julius Plenz , zsh-workers@sunsite.dk Subject: Re: Completions for pump and dhclient Message-ID: <20050726003102.GA2872@scowler.net> Mail-Followup-To: Julius Plenz , zsh-workers@sunsite.dk References: <20050725232931.GE3614@cvmx.de> <20050725235342.GA1204@scowler.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050725235342.GA1204@scowler.net> User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 > Index: Completion/Unix/Command/_dhclient This handles both dhclient 2 and 3. Index: Completion/Unix/Command/_dhclient =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_dhclient,v retrieving revision 1.1 diff -u -r1.1 _dhclient --- Completion/Unix/Command/_dhclient 25 Jul 2005 23:59:06 -0000 1.1 +++ Completion/Unix/Command/_dhclient 26 Jul 2005 00:29:19 -0000 @@ -1,7 +1,31 @@ -#compdef dhclient +#compdef dhclient dhclient3 -_arguments \ - '-p[Port to transmit to / listen on]' \ +local _dhclient_common_args + +_dhclient_common_args=( + '-p[port to transmit to / listen on]:_ports' + '-d[force to run in foreground]' + ':interface:_net_interfaces' +) + +if _pick_variant three=V3 two --help; then + _arguments \ + '-q[quiet]' \ + '-1[only try once to get a lease]' \ + '-r[release the current lease]' \ + '-lf[lease file]:lease file:_files' \ + '-pf[pid file]:pid file:_files' \ + '-cf[config file]:config file:_files' \ + '-sf[script file]:script file:_files' \ + '-e[env vars to pass to child processes]:env var key value pairs:' \ + '-s[transmit to specific target instead of broadcast]:server:_hosts' \ + '-g[force giaddr field]:relay:_hosts' \ + '-n[do not configure any interfaces]' \ + '-nw[daemonize immediately rather than wait for IP acquisition]' \ + '-w[do not exit if there are no interfaces found to configure]' \ + "$_dhclient_common_args[@]" +else + _arguments \ '-e[Exit if configuration failed after a certain time]' \ - '-d[Force to run in foreground]' \ - ':Interface:_net_interfaces' + "$_dhclient_common_args[@]" +fi