/bash_completion.d/pbuilder
http://github.com/brinkman83/bashrc · #! · 27 lines · 23 code · 4 blank · 0 comment · 0 complexity · 6af3c8c99796ab77971de5ffac83a0f8 MD5 · raw file
- # 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 options
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- options='--create --update --build --login --execute --dumpconfig'
- if [ $COMP_CWORD -eq 1 ]; then
- COMPREPLY=( $( compgen -W "$options" | grep "^$cur" ) )
- elif [ "${COMP_WORDS[1]}" = --build ]; then
- COMPREPLY=( $( compgen -o filenames -G "$cur*.dsc" ) )
- fi
- return 0
- }
- [ "$have" ] && complete -F _pbuilder -o filenames pbuilder