diff options
Diffstat (limited to 'completions/rfkill')
-rw-r--r-- | completions/rfkill | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/completions/rfkill b/completions/rfkill index 5c51ff9d..305f19d1 100644 --- a/completions/rfkill +++ b/completions/rfkill @@ -1,17 +1,14 @@ -# bash completion for rfkill +# bash completion for rfkill -*- shell-script -*- -have rfkill && _rfkill() { - local cur prev - - COMPREPLY=() - _get_comp_words_by_ref cur prev + local cur prev words cword + _init_completion || return if [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '--version' -- "$cur" ) ) else - case $COMP_CWORD in + case $cword in 1) COMPREPLY=( $( compgen -W "help event list block unblock" \ -- "$cur" ) ) @@ -28,10 +25,4 @@ _rfkill() } && complete -F _rfkill rfkill -# 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 |