eject: New completion.

This commit is contained in:
Ville Skyttä 2012-08-19 13:48:20 +03:00
parent 904faab0c5
commit b9276c8a37
4 changed files with 50 additions and 0 deletions

View File

@ -75,6 +75,7 @@ bashcomp_DATA = a2x \
dumpe2fs \
e2freefrag \
e2label \
eject \
eog \
ether-wake \
evince \

30
completions/eject Normal file
View File

@ -0,0 +1,30 @@
# bash completion for eject(1) -*- shell-script -*-
_eject()
{
local cur prev words cword
_init_completion || return
case $prev in
-h|--help|-V|--version|-c|--changerslot|-x|--cdspeed)
return
;;
-a|--auto|-i|--manualeject)
COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) )
return
;;
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
return
elif [[ $prev == @(-d|--default) ]]; then
return
fi
_cd_devices
_dvd_devices
} &&
complete -F _eject eject
# ex: ts=4 sw=4 et filetype=sh

View File

@ -0,0 +1 @@
assert_source_completions eject

View File

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