mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 15:41:09 +00:00
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
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)
|
|
_filedir "dsc"
|
|
;;
|
|
*)
|
|
COMPREPLY=( $( compgen -W "$options" | grep "^$cur" ) )
|
|
;;
|
|
esac
|
|
|
|
return 0
|
|
}
|
|
[ "$have" ] && _pbuilder-aliases()
|
|
{
|
|
local distro builder arch
|
|
for distro in $(ubuntu-distro-info --all; debian-distro-info --all) stable testing unstable; do
|
|
for builder in pbuilder cowbuilder; do
|
|
echo "$builder-$distro"
|
|
for arch in i386 amd64 armhf; do
|
|
echo "$builder-$distro-$arch"
|
|
done
|
|
done
|
|
done
|
|
return 0
|
|
}
|
|
[ "$have" ] && complete -F _pbuilder-dist -o filenames pbuilder-dist cowbuilder-dist $(_pbuilder-aliases)
|