about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2005-07-26 00:34:10 +0000
committerClint Adams <clint@users.sourceforge.net>2005-07-26 00:34:10 +0000
commit857c5983f8d460be85e380c1fd025dbb3a27b304 (patch)
tree1e7c9ef9559154f516da5b1c37567fec049ac7ab
parent046b471eab664de97b643a72d645133a9941c168 (diff)
downloadzsh-857c5983f8d460be85e380c1fd025dbb3a27b304.tar.gz
zsh-857c5983f8d460be85e380c1fd025dbb3a27b304.tar.xz
zsh-857c5983f8d460be85e380c1fd025dbb3a27b304.zip
21516: handle dhclient V3 as well as V2.
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_dhclient34
2 files changed, 32 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c93720e25..16af26a30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-07-25  Clint Adams  <clint@zsh.org>
 
+	* 21526: Completion/Unix/Command/_dhclient: handle dhclient V3 as
+	well as V2.
+
 	* 21523, 21524: Julius Plenz: Completion/Unix/Command/_dhclient,
 	Completion/Unix/Command/_pump: completions for pump and dhclient.
 
diff --git a/Completion/Unix/Command/_dhclient b/Completion/Unix/Command/_dhclient
index 47af999b0..5208ea05b 100644
--- a/Completion/Unix/Command/_dhclient
+++ b/Completion/Unix/Command/_dhclient
@@ -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