Add pm-utils completion.
This commit is contained in:
parent
0f25d9c66f
commit
69aa25cd8f
2
CHANGES
2
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
|
||||
|
@ -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 \
|
||||
|
34
contrib/pm-utils
Normal file
34
contrib/pm-utils
Normal 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
|
Loading…
x
Reference in New Issue
Block a user