Add option completion for removepkg

This commit is contained in:
Igor Murzov 2010-05-24 02:01:13 +04:00
parent b9ea1a9b57
commit f595b60bde

View File

@ -34,8 +34,6 @@ _pkgtool()
$split && return 0
_expand || return 0
local IFS=$'\t\n'
COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
$( compgen -d -- "$cur" ) )
@ -47,11 +45,17 @@ _removepkg()
{
COMPREPLY=()
local cur=`_get_cword`
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-copy -keep -preserve -warn' \
-- "$cur" ) )
return 0
fi
COMPREPLY=( $( (cd /var/log/packages; compgen -f -- "$cur") ) )
} &&
complete -F _removepkg -o filenames removepkg &&
complete -o plusdirs -f -X '!*.t[bglx]z' installpkg upgradepkg explodepkg
complete -F _removepkg -o filenames removepkg
complete -o plusdirs -f -X '!*.t[bglx]z' installpkg upgradepkg explodepkg
# Local variables:
# mode: shell-script