summaryrefslogtreecommitdiff
path: root/etc/completions/_iwlist
blob: 10f7f937db125d0c8fc169d8fdceb35da0ff1a5a (plain)
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
32
33
34
35
#compdef iwlist
## iwlist completion as requested by mxey
## Copyright (C) 2008 by Daniel Friesel <derf@finalrewind.org>
## License: WTFPL <http://sam.zoy.org/wtfpl>:
##   0. You just DO WHAT THE FUCK YOU WANT TO.
##
## http://finalrewind.org/git/zsh/plain/etc/completions/_iwlist

function _iwlist_options () {
	typeset -a options
	options=(
		'scanning:list accesspoints'
		'frequency:list available frequencies'
		'bitrate:list supported bitrates'
		'encryption:list encryption keys and key sizes'
		'power:list power management modes'
		'txpower:list available transmit powers'
		'retry:list transmit retry limits and lifetime'
		'event:list supported wireless events'
		'auth:list set WPA authentication parameters'
		'wpakeys:list set WPA encryption keys'
		'genie:list GENeric Information Elements'
		'modulation:list supported and enabled modulations'
	)
	_describe option options
}

if (( CURRENT == 2 )); then
	_net_interfaces
	_iwlist_options
elif (( CURRENT == 3 )); then
	_iwlist_options
else
	_message "no more arguments"
fi