[devscripts] 01/01: Updated custom bash completion handling for mk-origtargz

Nicholas Bamber periapt at moszumanska.debian.org
Tue Dec 1 10:03:59 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 86f7107b0f46f76d77ce77222dc564c10fea8fe5
Author: Nicholas Bamber <nicholas at periapt.co.uk>
Date:   Tue Dec 1 10:03:41 2015 +0000

    Updated custom bash completion handling for mk-origtargz
---
 debian/changelog                     |  1 +
 scripts/mk-origtargz.bash_completion | 13 ++++++++-----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a5959d2..293341b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,7 @@ devscripts (2.15.10) UNRELEASED; urgency=medium
     - Split out bts bash completion handling into its own script
   * Added custom bash completion support for debuild, checkbashisms,
     list-unreleased, dscverify and licensecheck
+  * Updated custom bash completion handling for mk-origtargz
   * licensecheck:
     - Tweaked parselicense to capture 'and or' as well as
       'and/or' in GPL licenses (Closes: #559429)
diff --git a/scripts/mk-origtargz.bash_completion b/scripts/mk-origtargz.bash_completion
index 4e6d499..30d81b8 100644
--- a/scripts/mk-origtargz.bash_completion
+++ b/scripts/mk-origtargz.bash_completion
@@ -13,24 +13,27 @@ _mk_origtargz_completion () {
     opts+=" --exclude-file --copyright-file"
     opts+=" --package --directory -C"
     opts+=" --copy --symlink --rename --repack --repack-suffix -S"
-    opts+=" --compression --copyright-file"
+    opts+=" --compression --copyright-file --unzipopt"
 
     case "${prev}" in
         --compression)
             local formats=(gzip bzip2 lzma xz)
-            COMPREPLY=( $(compgen -W "${formats[*]}" -- ${cur}) )
+            COMPREPLY=( $(compgen -W "${formats[*]}" -- "${cur}" ) )
             ;;
 
         --directory|-C)
-            COMPREPLY=( $(compgen -A directory -- ${cur}) )
+            COMPREPLY=( $(compgen -A directory -- "${cur}" ) )
             ;;
 
         --copyright-file)
-            COMPREPLY=( $(compgen -A file -- ${cur}) )
+            COMPREPLY=( $(compgen -A file -- "${cur}" ) )
+            ;;
+        --unzipopt)
+            COMPREPLY=( $(compgen -W '-Z -a -b -D -j -n' -- "${cur}" ) )
             ;;
 
         *)
-            COMPREPLY=($(compgen -W "${opts}" -- ${cur}))  
+            COMPREPLY=($(compgen -W "${opts}" -- "${cur}" ) )  
             ;;
     esac
 }

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