[devscripts] 01/01: bash completion for dscverify

Nicholas Bamber periapt at moszumanska.debian.org
Mon Nov 30 22:12:15 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 2fd2856932e87dafc34ea5c592ce34fbdd72a72f
Author: Nicholas Bamber <nicholas at periapt.co.uk>
Date:   Mon Nov 30 22:12:08 2015 +0000

    bash completion for dscverify
---
 debian/changelog                  |  2 +-
 scripts/dscverify.bash_completion | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 849d4c0..a5959d2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,7 +20,7 @@ devscripts (2.15.10) UNRELEASED; urgency=medium
     - Added listcachedbugs command to bts
     - Split out bts bash completion handling into its own script
   * Added custom bash completion support for debuild, checkbashisms,
-    list-unreleased and licensecheck
+    list-unreleased, dscverify and licensecheck
   * licensecheck:
     - Tweaked parselicense to capture 'and or' as well as
       'and/or' in GPL licenses (Closes: #559429)
diff --git a/scripts/dscverify.bash_completion b/scripts/dscverify.bash_completion
new file mode 100644
index 0000000..7c05b08
--- /dev/null
+++ b/scripts/dscverify.bash_completion
@@ -0,0 +1,20 @@
+# Debian dscverify(1) completion                             -*- shell-script -*-
+# Copyright: 2015, Nicholas Bamber <nicholas at periapt.co.uk>
+_dscverify()
+{
+    local cur prev words cword _options
+    _init_completion || return
+
+    if [[ "$cur" == -* ]]; then
+        _options='--keyring --no-default-keyrings --no-sig-check --verbose'
+        if [[ "$prev" == licensecheck ]]; then
+            _options+=' --no-conf'
+        fi
+        COMPREPLY=( $( compgen -W "${_options}" -- "$cur" ) )
+    else
+        declare -a _compreply=( $( compgen -o filenames -G '*.@(dsc|changes)' ) )
+        COMPREPLY=( $( compgen -W "${_compreply[*]}"  -- "$cur" ) )
+    fi
+
+    return 0
+} && complete -F _dscverify dscverify

-- 
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