# iwlist completion -*- shell-script -*- proc _iwlist { var cur = '', prev = '', words = '', cword = '' _init_completion || return if [[ $cword -eq 1 ]] { if [[ "$cur" == -* ]] { setglobal COMPREPLY = '( '$( compgen -W '--help --version' -- "$cur" ) ) } else { _available_interfaces -w } } else { setglobal COMPREPLY = '( '$( compgen -W 'scan scanning freq frequency channel rate bit bitrate key enc encryption power txpower retry ap accesspoint peers event' -- "$cur" ) ) } } && complete -F _iwlist iwlist # ex: ts=4 sw=4 et filetype=sh