[devscripts] 06/06: add bash-completion for dcut
James McCoy
jamessan at debian.org
Wed Jun 3 05:02:26 UTC 2015
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit afd239bcaa6124cf3b495cf1702c974d6b2660ea
Author: Hideki Yamane <henrich at debian.org>
Date: Sun May 31 16:49:32 2015 +0900
add bash-completion for dcut
Signed-off-by: James McCoy <jamessan at debian.org>
---
debian/changelog | 3 +++
scripts/dcut.bash_completion | 46 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 2d2d2f7..cc284ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -52,6 +52,9 @@ devscripts (2.15.5) UNRELEASED; urgency=medium
* uscan: Use pypi.debian.net redirector instead of
pypi.debian.org/packages/source URLs. (Closes: #785746)
+ [ Hideki Yamane ]
+ * Add bash completion for dcut. (Closes: #787321)
+
-- Cyril Brulebois <kibi at debian.org> Tue, 28 Apr 2015 16:58:36 +0200
devscripts (2.15.4) unstable; urgency=medium
diff --git a/scripts/dcut.bash_completion b/scripts/dcut.bash_completion
new file mode 100644
index 0000000..4a1a6bd
--- /dev/null
+++ b/scripts/dcut.bash_completion
@@ -0,0 +1,46 @@
+have dcut &&
+_dcut()
+{
+ local cur prev options commands
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ options='-c --config -d -h --host -s -m --maintainer -k --keyid
+ -t -O --output -P --passive -s --simulate -U --upload
+ -i --input -v --version'
+ commands='mv rm cancel'
+
+ case $prev in
+ -k | --keyid)
+ keyid_options=`gpg -K|grep ^sec|cut -d'/' -f2|cut -d' ' -f1`
+ COMPREPLY=( $( compgen -W "$keyid_options" | grep ^$cur ) )
+ ;;
+ mv | rm | cancel)
+ COMPREPLY=( $(
+ compgen -G "${cur}*.changes"
+ compgen -G "${cur}*.commands"
+ ) )
+ ;;
+ -*)
+ COMPREPLY=( $(
+ compgen -G "${cur}*.changes"
+ compgen -G "${cur}*.dsc"
+ compgen -G "${cur}*.commands"
+ ) )
+ ;;
+ *)
+ COMPREPLY=( $(
+ compgen -G "${cur}*.changes"
+ compgen -G "${cur}*.dsc"
+ compgen -G "${cur}*.commands"
+ compgen -W "$commands" | grep "^$cur"
+ compgen -W "$options" | grep "^$cur"
+ ) )
+ ;;
+ esac
+
+ return 0
+
+}
+[ "$have" ] && complete -F _dcut -o filenames dcut
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list