1
# bash completion for Linux wireless-tools
12
_get_comp_words_by_ref cur prev
16
COMPREPLY=( $( compgen -W 'managed ad-hoc master \
17
repeater secondary monitor' -- "$cur" ) )
21
COMPREPLY=( $( compgen -W 'on off any' -- "$cur" ) )
22
if [ -n "${COMP_IWLIST_SCAN:-}" ]; then
23
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W \
24
"$( iwlist ${COMP_WORDS[1]} scan | \
25
awk -F'\"' '/ESSID/ {print $2}' )" -- "$cur" ) )
30
COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) )
34
COMPREPLY=( $( compgen -W "$( iwlist ${COMP_WORDS[1]} channel | \
35
awk '/^[ \t]*Channel/ {print $2}' )" -- "$cur" ) )
40
COMPREPLY=( $( compgen -W "$( iwlist ${COMP_WORDS[1]} channel | \
41
awk '/^[ \t]*Channel/ {print $4"G"}')" -- "$cur" ) )
45
COMPREPLY=( $( compgen -W 'on off any' -- "$cur" ) )
46
if [ -n "${COMP_IWLIST_SCAN:-}" ]; then
47
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W \
48
"$( iwlist ${COMP_WORDS[1]} scan | \
49
awk -F ': ' '/Address/ {print $2}' )" -- "$cur" ) )
54
COMPREPLY=( $( compgen -W 'auto fixed' -- "$cur" ) )
55
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W \
56
"$( iwlist ${COMP_WORDS[1]} rate | \
57
awk '/^[ \t]*[0-9]/ {print $1"M"}' )" -- "$cur" ) )
61
COMPREPLY=( $( compgen -W 'auto fixed off' -- "$cur" ) )
65
COMPREPLY=( $( compgen -W 'off on open restricted' -- "$cur" ) )
69
COMPREPLY=( $( compgen -W 'period timeout off on' -- "$cur" ) )
73
COMPREPLY=( $( compgen -W 'off on auto' -- "$cur" ) )
77
COMPREPLY=( $( compgen -W 'limit lifetime' -- "$cur" ) )
82
if [ $COMP_CWORD -eq 1 ]; then
83
if [[ "$cur" == -* ]]; then
84
COMPREPLY=( $( compgen -W '--help --version' -- "$cur" ) )
86
_available_interfaces -w
89
COMPREPLY=( $( compgen -W 'essid nwid mode freq channel sens mode \
90
ap nick rate rts frag enc key power txpower commit' -- "$cur" ) )
94
complete -F _iwconfig iwconfig
103
_get_comp_words_by_ref cur prev
105
if [ $COMP_CWORD -eq 1 ]; then
106
if [[ "$cur" == -* ]]; then
107
COMPREPLY=( $( compgen -W '--help --version' -- "$cur" ) )
109
_available_interfaces -w
112
COMPREPLY=( $( compgen -W 'scan scanning freq frequency \
113
channel rate bit bitrate key enc encryption power \
114
txpower retry ap accesspoint peers event' -- "$cur" ) )
117
complete -F _iwlist iwlist
126
_get_comp_words_by_ref cur
128
if [ $COMP_CWORD -eq 1 ]; then
129
if [[ "$cur" == -* ]]; then
130
COMPREPLY=( $( compgen -W '--help --version' -- "$cur" ) )
132
_available_interfaces -w
135
COMPREPLY=( $( compgen -W 'setthr getthr off' -- "$cur" ) )
138
complete -F _iwspy iwspy
147
_get_comp_words_by_ref cur prev
151
COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) )
155
COMPREPLY=( $( compgen -W 'ad-hoc managed' -- "$cur" ) )
160
if [ $COMP_CWORD -eq 1 ]; then
161
if [[ "$cur" == -* ]]; then
162
COMPREPLY=( $( compgen -W '--help --version' -- "$cur" ) )
164
_available_interfaces -w
167
COMPREPLY=( $( compgen -W '--all roam port' -- "$cur" ) )
170
complete -F _iwpriv iwpriv
177
# sh-indent-comment: t
178
# indent-tabs-mode: nil
180
# ex: ts=4 sw=4 et filetype=sh