aboutsummaryrefslogtreecommitdiff
path: root/bash_completion.d
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2010-01-30 16:59:02 +0100
committerLoïc Minier <lool@dooz.org>2010-01-30 16:59:02 +0100
commitb6d04b1a4890cf23464ac8e6f455e7cf94ccf877 (patch)
tree934819e005e083ce65d7c3dc80f45c5c7cf42e17 /bash_completion.d
parente624266136daec4bc65fb357186e7bbe5bbe87d3 (diff)
downloadpbuilder-b6d04b1a4890cf23464ac8e6f455e7cf94ccf877.tar
pbuilder-b6d04b1a4890cf23464ac8e6f455e7cf94ccf877.tar.gz
Convert other files' install to make vars
Diffstat (limited to 'bash_completion.d')
-rw-r--r--bash_completion.d/pbuilder27
1 files changed, 27 insertions, 0 deletions
diff --git a/bash_completion.d/pbuilder b/bash_completion.d/pbuilder
new file mode 100644
index 0000000..1338411
--- /dev/null
+++ b/bash_completion.d/pbuilder
@@ -0,0 +1,27 @@
+# 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