[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.90-157-g0ab693c
Ville Skyttä
ville.skytta at iki.fi
Mon Mar 26 19:16:18 UTC 2012
The following commit has been merged in the master branch:
commit 0ab693ca50206e46f23fccba52eeb8516e2e6fc9
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Mon Mar 26 22:15:49 2012 +0300
acpi: New completion.
diff --git a/completions/Makefile.am b/completions/Makefile.am
index 03165cf..fabe1c2 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -2,6 +2,7 @@ bashcompdir = $(pkgdatadir)/completions
bashcomp_DATA = a2x \
abook \
aclocal \
+ acpi \
add_members \
alias \
ant \
diff --git a/completions/chrpath b/completions/acpi
similarity index 55%
copy from completions/chrpath
copy to completions/acpi
index 29a7185..ccc5b63 100644
--- a/completions/chrpath
+++ b/completions/acpi
@@ -1,27 +1,23 @@
-# chrpath(1) completion -*- shell-script -*-
+# acpi(1) completion -*- shell-script -*-
-_chrpath()
+_acpi()
{
local cur prev words cword
_init_completion || return
case $prev in
- -v|--version|-h|--help)
+ -h|--help|-v|--version)
return
;;
- -r|--replace)
+ -d|--directory)
_filedir -d
return
;;
esac
- if [[ $cur == -* ]]; then
+ [[ $cur == -* ]] && \
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
- return
- fi
-
- _filedir
} &&
-complete -F _chrpath chrpath
+complete -F _acpi acpi
# ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/acpi.exp b/test/completion/acpi.exp
new file mode 100644
index 0000000..934f6d1
--- /dev/null
+++ b/test/completion/acpi.exp
@@ -0,0 +1 @@
+assert_source_completions acpi
diff --git a/test/lib/completions/bk.exp b/test/lib/completions/acpi.exp
similarity index 80%
copy from test/lib/completions/bk.exp
copy to test/lib/completions/acpi.exp
index b652e6b..278cdce 100644
--- a/test/lib/completions/bk.exp
+++ b/test/lib/completions/acpi.exp
@@ -11,9 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "bk "
-
-
+assert_complete_any "acpi -"
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list