diff options
author | Guido Günther <agx@sigxcpu.org> | 2010-01-28 19:03:33 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-01-31 19:11:55 +0100 |
commit | a7fe7c4678a48072c11bb57fd1f99ca7b8118158 (patch) | |
tree | 3e89aa27292e357af07b7b6a4c876a03040ac353 /debian | |
parent | 07d54efbe86b1d93805a1a3a78eca45c32bc5734 (diff) | |
download | git-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')
-rw-r--r-- | debian/control | 3 | ||||
-rw-r--r-- | debian/git-buildpackage.bash-completion | 15 | ||||
-rwxr-xr-x | debian/rules | 3 |
3 files changed, 20 insertions, 1 deletions
diff --git a/debian/control b/debian/control index 6eb4056a..c5c5964d 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,8 @@ Section: vcs Priority: optional Maintainer: Guido Günther <agx@sigxcpu.org> Build-Depends: cdbs, debhelper (>= 5), python-dev, python-support (>= 0.3), - pychecker, gtk-doc-tools, sgml2x, docbook-utils, jade, python-dateutil, python-nose + pychecker, gtk-doc-tools, sgml2x, docbook-utils, jade, python-dateutil, python-nose, + bash-completion Standards-Version: 3.8.3 Vcs-Git: git://honk.sigxcpu.org/git/git-buildpackage.git Vcs-Browser: http://git.debian.org/?p=users/agx/git-buildpackage.git 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 diff --git a/debian/rules b/debian/rules index 75b760ef..d4cf95f3 100755 --- a/debian/rules +++ b/debian/rules @@ -51,6 +51,9 @@ $(VERSION_ENT): debian/changelog build/git-buildpackage:: $(MANPAGES) $(MANUAL) $(GBP_VERSION) checks +binary-post-install/git-buildpackage:: + dh_bash-completion + clean:: -rm git-*.py gbp-*.py -rm docs/*.1 docs/manpage.* $(VERSION_ENT) |