[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 69aa25cd8fae3934042c545abcb9429526033dc5
Ville Skyttä
ville.skytta at iki.fi
Thu Dec 10 20:06:01 UTC 2009
The following commit has been merged in the master branch:
commit 69aa25cd8fae3934042c545abcb9429526033dc5
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Thu Dec 10 22:00:52 2009 +0200
Add pm-utils completion.
diff --git a/CHANGES b/CHANGES
index 48de268..7d01a29 100644
--- a/CHANGES
+++ b/CHANGES
@@ -27,7 +27,7 @@ bash-completion (2.x)
mysqladmin, screen, service, scp, ssh, update-alternatives, and general
hostname completions.
* Add abook and wtf completion, based on work by Raphaël Droz.
- * Add jarsigner, k3b, lftpget, pack200 and unpack200 completions.
+ * Add jarsigner, k3b, lftpget, pm-utils, pack200 and unpack200 completions.
* Don't overwrite other host completions when completing from multiple
SSH known hosts files.
* Speed up installed rpm package completion on SUSE, based on work by
diff --git a/Makefile.am b/Makefile.am
index 50ffc53..9f2cb5b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -95,6 +95,7 @@ bashcomp_DATA = contrib/abook \
contrib/pkg-config \
contrib/pkg_install \
contrib/pkgtools \
+ contrib/pm-utils \
contrib/portupgrade \
contrib/postfix \
contrib/postgresql \
diff --git a/contrib/pm-utils b/contrib/pm-utils
new file mode 100644
index 0000000..85d4f21
--- /dev/null
+++ b/contrib/pm-utils
@@ -0,0 +1,34 @@
+# bash completion for pm-utils
+
+have pm-is-supported &&
+_pm_is_supported()
+{
+ local cur=`_get_cword`
+ COMPREPLY=( $( compgen -W '--help --suspend --hibernate --suspend-hybrid' \
+ -- "$cur" ) )
+} &&
+complete -F _pm_is_supported pm-is-supported
+
+have pm-hibernate || have pm-suspend || have pm-suspend-hybrid &&
+_pm_action()
+{
+ local cur=`_get_cword`
+ COMPREPLY=( $( compgen -W "--help $( _parse_help "$1" )" -- "$cur" ) )
+} &&
+complete -F _pm_action pm-hibernate pm-suspend pm-suspend-hybrid
+
+have pm-powersave &&
+_pm_powersave()
+{
+ local cur=`_get_cword`
+ COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
+} &&
+complete -F _pm_powersave pm-powersave
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh
--
bash-completion
More information about the Bash-completion-commits
mailing list