Adrien Cunin 622ffce6a1 * debian/ubuntu-dev-tools.install: install bash_completion/pbuilder-dist in
/etc/bash_completion.d/ instead of /etc/bash_completion.d/pbuilder-dist/
* bash_completion/pbuilder-dist: apply the completion not only to
  pbuilder-dist but also to pbuilder-{hardy,sid,etc.}
2008-03-23 22:13:09 +01:00

36 lines
919 B
Plaintext

# pbuilder-dist completion
#
# Copyright 2008 Stephan Hermann <sh@sourcecode.de>, created for
# the Ubuntu MOTU Team.
#
# Released under the GNU General Public License, version 2
#
# Based upon cobwuilder's autocompletion, Copyright 2007 Cyril
# Brulebois <cyril.brulebois@enst-bretagne.fr>
have pbuilder-dist &&
_pbuilder-dist()
{
local cur prev options
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
options='create update build clean login execute'
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,dapper,edgy,feisty,gutsy,hardy,intrepid,sarge,etch,lenny,sid}
# Make it pbuilder-* if you know how to do it