[devscripts] 01/01: Added custom bash completion support for debuild and licensecheck
Nicholas Bamber
periapt at moszumanska.debian.org
Sun Nov 29 13:33:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
periapt pushed a commit to branch master
in repository devscripts.
commit b72b998cb3b1a03190a0fc329e962e12b40ce080
Author: Nicholas Bamber <nicholas at periapt.co.uk>
Date: Sun Nov 29 13:32:50 2015 +0000
Added custom bash completion support for debuild and licensecheck
---
debian/changelog | 2 +-
scripts/licensecheck.bash_completion | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 38e7f11..6ddaebc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,7 +19,7 @@ devscripts (2.15.10) UNRELEASED; urgency=medium
- Added --soap-timeout option to bts
- Added listcachedbugs command to bts
- Split out bts bash completion handling into its own script
- * Added custom bash completion support for debuild
+ * Added custom bash completion support for debuild and licensecheck
* licensecheck:
- Tweaked parselicense to capture 'and or' as well as
'and/or' in GPL licenses (Closes: #559429)
diff --git a/scripts/licensecheck.bash_completion b/scripts/licensecheck.bash_completion
new file mode 100644
index 0000000..51bfa94
--- /dev/null
+++ b/scripts/licensecheck.bash_completion
@@ -0,0 +1,29 @@
+# Debian licensecheck(1) completion -*- shell-script -*-
+# Copyright: 2015, Nicholas Bamber <nicholas at periapt.co.uk>
+_licensecheck()
+{
+ local cur prev words cword i _options special _prefix
+ _init_completion || return
+
+ case $prev in
+ --lines)
+ COMPREPLY=( $( compgen -W '120 200 300 400' -- "$cur" ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ _options='--verbose --no-verbose --lines --ignore --recursive --check --copyright --machine'
+ if [[ "$prev" == licensecheck ]]; then
+ _options+=' --no-conf'
+ fi
+ COMPREPLY=( $( compgen -W "${_options}" -- "$cur" ) )
+ else
+ COMPREPLY=( $( compgen -o filenames -f -- "$cur" ) )
+ fi
+
+ return 0
+} &&
+complete -F _licensecheck licensecheck
+
+# ex: ts=4 sw=4 et filetype=sh
--
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