Merge branch 'master' of git+ssh://fvu-guest@git.debian.org/git/bash-completion/bash-completion

This commit is contained in:
Freddy Vulto 2009-12-10 21:29:48 +01:00
commit bc9e37a39c
3 changed files with 36 additions and 1 deletions

View File

@ -27,7 +27,7 @@ bash-completion (2.x)
mysqladmin, screen, service, scp, ssh, update-alternatives, and general mysqladmin, screen, service, scp, ssh, update-alternatives, and general
hostname completions. hostname completions.
* Add abook and wtf completion, based on work by Raphaël Droz. * 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 * Don't overwrite other host completions when completing from multiple
SSH known hosts files. SSH known hosts files.
* Speed up installed rpm package completion on SUSE, based on work by * Speed up installed rpm package completion on SUSE, based on work by

View File

@ -95,6 +95,7 @@ bashcomp_DATA = contrib/abook \
contrib/pkg-config \ contrib/pkg-config \
contrib/pkg_install \ contrib/pkg_install \
contrib/pkgtools \ contrib/pkgtools \
contrib/pm-utils \
contrib/portupgrade \ contrib/portupgrade \
contrib/postfix \ contrib/postfix \
contrib/postgresql \ contrib/postgresql \

34
contrib/pm-utils Normal file
View File

@ -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