Split dselect completion to contrib/dselect

This commit is contained in:
David Paleino 2009-06-05 21:42:14 +02:00
parent c601309ae5
commit b5029b732e
4 changed files with 37 additions and 36 deletions

View File

@ -30,6 +30,7 @@ bash-completion (1.x)
* Split dpkg-related completions to contrib/dpkg (and re-enable usage
of grep-status if available)
* Split gcc completion to contrib/gcc
* Split dselect completion to contrib/dselect
[ Ville Skyttä ]
* Split yum and yum-arch completion into contrib/yum.

View File

@ -30,6 +30,7 @@ bashcomp_DATA = contrib/ant \
contrib/dhclient \
contrib/dict \
contrib/dpkg \
contrib/dselect \
contrib/dsniff \
contrib/findutils \
contrib/freeciv \

View File

@ -1461,42 +1461,6 @@ _cardctl()
} &&
complete -F _cardctl cardctl
# Debian Linux dselect(8) completion.
#
have dselect &&
_dselect()
{
local cur prev
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case "$prev" in
--admindir)
_filedir -d
return 0
;;
-@(D|debug))
_filedir
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--admindir --help --version --licence \
--license --expert --debug' -- $cur ) )
else
COMPREPLY=( $( compgen -W 'access update select install config \
remove quit' -- $cur ) )
fi
return 0
} &&
complete -F _dselect $filenames dselect
# PINE address-book completion
#
have pine &&

35
contrib/dselect Normal file
View File

@ -0,0 +1,35 @@
# Debian Linux dselect(8) completion.
#
have dselect &&
_dselect()
{
local cur prev
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case "$prev" in
--admindir)
_filedir -d
return 0
;;
-@(D|debug))
_filedir
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--admindir --help --version --licence \
--license --expert --debug' -- $cur ) )
else
COMPREPLY=( $( compgen -W 'access update select install config \
remove quit' -- $cur ) )
fi
return 0
} &&
complete -F _dselect $filenames dselect