Add options --debug & --version

This commit is contained in:
Joe Bloggs 2014-05-02 13:07:22 +01:00
parent 587276b7c2
commit 0c3e27497a
1 changed files with 18 additions and 6 deletions

24
src/_iw
View File

@ -229,13 +229,25 @@ local -a phydevs
phy_devs=( \( $(iw list|grep '^[[:alnum:]]\+'|cut -f 2 -d ' ') \) ) phy_devs=( \( $(iw list|grep '^[[:alnum:]]\+'|cut -f 2 -d ' ') \) )
phy_cmds=( \( $matchany ":test:test:$phy_devs[*]" \) "$phy_cmds[@]" ) phy_cmds=( \( $matchany ":test:test:$phy_devs[*]" \) "$phy_cmds[@]" )
local -a cmdsdebug
_regex_words debug_commands "iw command" \
'd*ev:commands to control/list the software devices:$dev_cmds' \
'e*vent:monitor events from the kernel:$event_opts' \
'h*elp:print usage for each command' \
'l*ist:list all wireless devices and their capabilities' \
'p*hy:commands to control the physical device:$phy_cmds' \
'r*eg:get/set regulatory domain:$reg_cmds'
cmdsdebug+=("$reply[@]")
_regex_words commands "iw command" \ _regex_words commands "iw command" \
'd*ev:commands to control/list the software devices:$dev_cmds' \ '--debug:enable netlink debugging:$cmdsdebug' \
'e*vent:monitor events from the kernel:$event_opts' \ '--version:show version (3.2)' \
'h*elp:print usage for each command' \ 'd*ev:commands to control/list the software devices:$dev_cmds' \
'l*ist:list all wireless devices and their capabilities' \ 'e*vent:monitor events from the kernel:$event_opts' \
'p*hy:commands to control the physical device:$phy_cmds' \ 'h*elp:print usage for each command' \
'r*eg:get/set regulatory domain:$reg_cmds' 'l*ist:list all wireless devices and their capabilities' \
'p*hy:commands to control the physical device:$phy_cmds' \
'r*eg:get/set regulatory domain:$reg_cmds'
args+=("$reply[@]") args+=("$reply[@]")
_regex_arguments _iw "${args[@]}" _regex_arguments _iw "${args[@]}"