diff options
Diffstat (limited to 'bash_completion.pbuilder')
-rw-r--r-- | bash_completion.pbuilder | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/bash_completion.pbuilder b/bash_completion.pbuilder new file mode 100644 index 0000000..9f4fac4 --- /dev/null +++ b/bash_completion.pbuilder @@ -0,0 +1,31 @@ +# Debian GNU/Linux cowbuilder(1) completion +# Copyright 2007 Cyril Brulebois <cyril.brulebois@enst-bretagne.fr> +# +# This script can be distributed under the same license as the +# cowdancer or bash packages. +# +# adapted to pbuilder, the license is GPLv2 or later. +# Copyright 2007 Junichi Uekawa <dancer@debian.org> + +have pbuilder && +_pbuilder() +{ + local cur prev options + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + options='--create --update --build --login --execute --dumpconfig' + + case $prev in + --build) + COMPREPLY=( $( compgen -o filenames -G "$cur*.dsc" ) ) + ;; + *) + COMPREPLY=( $( compgen -W "$options" | grep "^$cur" ) ) + ;; + esac + + return 0 +} +[ "$have" ] && complete -F _pbuilder -o filenames pbuilder |