zsh-workers
 help / color / mirror / code / Atom feed
* Completions for pump and dhclient
@ 2005-07-25 23:29 Julius Plenz
  2005-07-25 23:53 ` Clint Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Julius Plenz @ 2005-07-25 23:29 UTC (permalink / raw)
  To: zsh-workers

Hi!

Yesterday I wrote two completions for "dhclient" and "pump". You can
get them at http://42.vg/71384

Julius


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Completions for pump and dhclient
  2005-07-25 23:29 Completions for pump and dhclient Julius Plenz
@ 2005-07-25 23:53 ` Clint Adams
  2005-07-26  0:31   ` Clint Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 2005-07-25 23:53 UTC (permalink / raw)
  To: Julius Plenz; +Cc: zsh-workers

> Yesterday I wrote two completions for "dhclient" and "pump". You can
> get them at http://42.vg/71384

Better to actually send them to the mailing list.

Index: Completion/Unix/Command/_pump
===================================================================
RCS file: Completion/Unix/Command/_pump
diff -N Completion/Unix/Command/_pump
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_pump	25 Jul 2005 23:52:09 -0000
@@ -0,0 +1,24 @@
+#compdef pump
+
+_arguments \
+      '(-c --config-file=)'{-c,--config-file=}'[Configuratio file to use]:Configuratio file to use:_files' \
+      '(-h --hostname=)'{-h,--hostname=}'[Hostname to request]:Hostname:_hosts' \
+      '(-i --interface=)'{-i,--interface=}'[Interface to configure]:Interface:_net_interfaces' \
+      '(-k --kill)'{-k,--kill}'[Kill daemon (and disable all interfaces)]' \
+      '(-l --lease=)'{-l,--lease=}'[Lease time to request (in hours)]' \
+      '(-L --leasesecs=)'{-L,--leasesecs=}'[Lease time to request (in seconds)]' \
+      '(-r --release)'{-r,--release}'[Release interface]:Interface:_net_interfaces' \
+      '(-R --renew)'{-R,--renew}'[Force immediate lease renewal]:Interface:_net_interfaces' \
+      '(-v --verbose)'{-v,--verbose}'[Log verbose debug info]' \
+      '(-s --status)'{-s,--status}'[Display interface status]:Interface:_net_interfaces' \
+      '(-d --no-dns)'{-d,--no-dns}"[Don't update resolv.conf]" \
+      '(-? --help)'{-?,--help}'[Display help message]' \
+      "--no-gateway[Don't set a gateway for this interface]" \
+      "--no-setup[Don't set up anything]" \
+      "--no-resolvconf[Don't set up resolvconf]" \
+      '--no-bootp[Ignore non-DHCP BOOTP responses]' \
+      '--lookup-hostname[Force lookup of hostname]' \
+      '--script=[Script to use]:Script to use:_files' \
+      "--win-client-ident[Set the client identifier to match Window's]" \
+      '--usage[Display brief usage message]' \
+      ':Interface:_net_interfaces'
Index: Completion/Unix/Command/_dhclient
===================================================================
RCS file: Completion/Unix/Command/_dhclient
diff -N Completion/Unix/Command/_dhclient
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_dhclient	25 Jul 2005 23:52:09 -0000
@@ -0,0 +1,7 @@
+#compdef dhclient
+
+_arguments \
+      '-p[Port to transmit to / listen on]' \
+      '-e[Exit if configuration failed after a certain time]' \
+      '-d[Force to run in foreground]' \
+      ':Interface:_net_interfaces'


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Completions for pump and dhclient
  2005-07-25 23:53 ` Clint Adams
@ 2005-07-26  0:31   ` Clint Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Clint Adams @ 2005-07-26  0:31 UTC (permalink / raw)
  To: Julius Plenz, zsh-workers

> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-26  0:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-25 23:29 Completions for pump and dhclient Julius Plenz
2005-07-25 23:53 ` Clint Adams
2005-07-26  0:31   ` Clint Adams

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).