acpi: New completion.

master
Ville Skyttä 2012-03-26 22:15:49 +03:00
parent 1fc97c47ba
commit 0ab693ca50
4 changed files with 43 additions and 0 deletions

View File

@ -2,6 +2,7 @@ bashcompdir = $(pkgdatadir)/completions
bashcomp_DATA = a2x \
abook \
aclocal \
acpi \
add_members \
alias \
ant \

23
completions/acpi Normal file
View File

@ -0,0 +1,23 @@
# acpi(1) completion -*- shell-script -*-
_acpi()
{
local cur prev words cword
_init_completion || return
case $prev in
-h|--help|-v|--version)
return
;;
-d|--directory)
_filedir -d
return
;;
esac
[[ $cur == -* ]] && \
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
} &&
complete -F _acpi acpi
# ex: ts=4 sw=4 et filetype=sh

1
test/completion/acpi.exp Normal file
View File

@ -0,0 +1 @@
assert_source_completions acpi

View File

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