From: Clint Adams <clint@zsh.org>
To: Julius Plenz <jp@cvmx.de>, zsh-workers@sunsite.dk
Subject: Re: Completions for pump and dhclient
Date: Mon, 25 Jul 2005 20:31:02 -0400 [thread overview]
Message-ID: <20050726003102.GA2872@scowler.net> (raw)
In-Reply-To: <20050725235342.GA1204@scowler.net>
> 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
prev parent reply other threads:[~2005-07-26 0:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-25 23:29 Julius Plenz
2005-07-25 23:53 ` Clint Adams
2005-07-26 0:31 ` Clint Adams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050726003102.GA2872@scowler.net \
--to=clint@zsh.org \
--cc=jp@cvmx.de \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).