diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-25 20:18:42 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-25 20:18:42 +0300 |
commit | b377dc5de84913b69efa325590e9d0bb97d02128 (patch) | |
tree | a2ba252228eabd2be018fdb8d4f8b1ad225f9825 /completions/iwpriv | |
parent | c922626d4b9b78d266c8336c702b4c5e9a0325d4 (diff) | |
parent | 3b029892f6f9db3b7210a7f66d636be3e5ec5fa2 (diff) | |
download | bash-completion-b377dc5de84913b69efa325590e9d0bb97d02128.tar.gz |
Merge branch 'dynamic-loading'
Diffstat (limited to 'completions/iwpriv')
-rw-r--r-- | completions/iwpriv | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/completions/iwpriv b/completions/iwpriv new file mode 100644 index 00000000..45ffadbd --- /dev/null +++ b/completions/iwpriv @@ -0,0 +1,37 @@ +# iwpriv completion + +_iwpriv() +{ + local cur prev words cword + _init_completion || return + + case $prev in + roam) + COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) ) + return 0 + ;; + port) + COMPREPLY=( $( compgen -W 'ad-hoc managed' -- "$cur" ) ) + return 0 + ;; + esac + + if [ $cword -eq 1 ]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--help --version' -- "$cur" ) ) + else + _available_interfaces -w + fi + else + COMPREPLY=( $( compgen -W '--all roam port' -- "$cur" ) ) + fi +} && +complete -F _iwpriv iwpriv + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh |