2008-01-22 20:11:59 +01:00
|
|
|
# pbuilder-dist completion
|
2008-01-22 18:35:56 +01:00
|
|
|
#
|
2008-01-22 20:11:59 +01:00
|
|
|
# Copyright 2008 Stephan Hermann <sh@sourcecode.de>, created for
|
|
|
|
# the Ubuntu MOTU Team.
|
2008-01-22 18:35:56 +01:00
|
|
|
#
|
2008-01-22 20:11:59 +01:00
|
|
|
# Released under the GNU General Public License, version 2
|
|
|
|
#
|
|
|
|
# Based upon cobwuilder's autocompletion, Copyright 2007 Cyril
|
|
|
|
# Brulebois <cyril.brulebois@enst-bretagne.fr>
|
|
|
|
|
2008-01-22 18:35:56 +01:00
|
|
|
|
|
|
|
have pbuilder-dist &&
|
|
|
|
_pbuilder-dist()
|
|
|
|
{
|
|
|
|
local cur prev options
|
|
|
|
|
|
|
|
COMPREPLY=()
|
|
|
|
cur=${COMP_WORDS[COMP_CWORD]}
|
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
2008-01-22 20:11:59 +01:00
|
|
|
|
|
|
|
options='create update build clean login execute'
|
2008-01-22 18:35:56 +01:00
|
|
|
|
|
|
|
case $prev in
|
|
|
|
build)
|
|
|
|
COMPREPLY=( $( compgen -o filenames -G "$cur*.dsc" ) )
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
COMPREPLY=( $( compgen -W "$options" | grep "^$cur" ) )
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
[ "$have" ] && complete -F _pbuilder-dist -o filenames pbuilder-dist
|