rmmod: Add option completions.
This commit is contained in:
parent
33883145af
commit
47c49dbfec
@ -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
|
||||
} &&
|
||||
|
1
test/completion/rmmod.exp
Normal file
1
test/completion/rmmod.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions rmmod
|
18
test/lib/completions/rmmod.exp
Normal file
18
test/lib/completions/rmmod.exp
Normal file
@ -0,0 +1,18 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "rmmod -"
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
Loading…
x
Reference in New Issue
Block a user