rmmod: Add option completions.

master
Ville Skyttä 2012-01-14 11:40:54 +02:00
parent 33883145af
commit 47c49dbfec
3 changed files with 30 additions and 0 deletions

View File

@ -6,6 +6,17 @@ _rmmod()
local cur prev words cword
_init_completion || return
case $prev in
-h|--help|-V|--version)
return
;;
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
return
fi
_installed_modules "$cur"
return 0
} &&

View File

@ -0,0 +1 @@
assert_source_completions rmmod

View File

@ -0,0 +1,18 @@
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
assert_complete_any "rmmod -"
sync_after_int
teardown