about summary refs log tree commit diff
path: root/Completion/Unix/Command/_dhclient
blob: 5208ea05b60d8c73c89648652ada6c6dd3efb785 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#compdef dhclient dhclient3

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]' \
      "$_dhclient_common_args[@]"
fi