summaryrefslogtreecommitdiff
path: root/debian/git-buildpackage.bash-completion
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2010-01-28 19:03:33 +0100
committerGuido Günther <agx@sigxcpu.org>2010-01-31 19:11:55 +0100
commita7fe7c4678a48072c11bb57fd1f99ca7b8118158 (patch)
tree3e89aa27292e357af07b7b6a4c876a03040ac353 /debian/git-buildpackage.bash-completion
parent07d54efbe86b1d93805a1a3a78eca45c32bc5734 (diff)
downloadgit-buildpackage-a7fe7c4678a48072c11bb57fd1f99ca7b8118158.tar.gz
git-buildpackage-a7fe7c4678a48072c11bb57fd1f99ca7b8118158.tar.bz2
git-buildpackage-a7fe7c4678a48072c11bb57fd1f99ca7b8118158.zip
Add basic bash completion for git-buildpackage
Thanks: Siegfried-Angel Gevatter Closes: #567313
Diffstat (limited to 'debian/git-buildpackage.bash-completion')
-rw-r--r--debian/git-buildpackage.bash-completion15
1 files changed, 15 insertions, 0 deletions
diff --git a/debian/git-buildpackage.bash-completion b/debian/git-buildpackage.bash-completion
new file mode 100644
index 00000000..9e3023e0
--- /dev/null
+++ b/debian/git-buildpackage.bash-completion
@@ -0,0 +1,15 @@
+# -*- shell-script -*-
+#
+# Bash tab auto-completion rules for git-buildpackage.
+# Put this file in /etc/bash_completion.d/ and bash will automatically load it.
+#
+# By Siegfried-Angel Gevatter Pujals <siegfried@gevatter.com>
+
+have git-buildpackage &&
+_git_buildpackage()
+{
+ local options=$(git-buildpackage --help | egrep -o '^ +\-\-[a-z\-]+=?')
+ local cur=${COMP_WORDS[COMP_CWORD]}
+ COMPREPLY=($(compgen -W "$options" -- $cur))
+}
+[ "${have:-}" ] && complete -F _git_buildpackage -o default git-buildpackage