[devscripts] 05/05: Define universal options more readably and maintainably.

Ben Finney bignose-guest at moszumanska.debian.org
Sun May 15 06:07:13 UTC 2016


This is an automated email from the git hooks/post-receive script.

bignose-guest pushed a commit to branch wip/issue/824372/include-all-options
in repository devscripts.

commit 480ddac2c41819d52aa880fd7abf8635da03dfb0
Author: Ben Finney <ben at benfinney.id.au>
Date:   Sun May 15 12:28:50 2016 +1000

    Define universal options more readably and maintainably.
---
 scripts/debdiff.bash_completion | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/scripts/debdiff.bash_completion b/scripts/debdiff.bash_completion
index 487019f..c97a5d7 100644
--- a/scripts/debdiff.bash_completion
+++ b/scripts/debdiff.bash_completion
@@ -15,6 +15,21 @@ _debdiff()
     local cur prev words cword
     _init_completion || return
 
+    options='-h --help -v --version'
+    options+=' -q --quiet'
+    options+=' -d --dirs --nodirs'
+    options+=' -w --ignore-space'
+    options+=' --diffstat --no-diffstat'
+    options+=' --auto-ver-sort --no-auto-ver-sort'
+    options+=' --unpack-tarballs --no-unpack-tarballs'
+    options+=' --control --nocontrol --controlfiles'
+    options+=' --wdiff-source-control --no-wdiff-source-control --wp --wl --wt'
+    options+=' --show-moved --noshow-moved --renamed'
+    options+=' --debs-dir'
+    options+=' --from'
+    options+=' --move --move-regex'
+    options+=' --exclude'
+
     for (( i=1; i<${#words[@]}; i++ )); do
         if [[ $file_list_mode == @(deb|dsc|changes) ]]; then
             if (( i == ${#words[@]}-1 )); then
@@ -58,8 +73,6 @@ _debdiff()
         if [[ $prev == --debs-dir ]]; then
             COMPREPLY=$( ( compgen -d -- "$cur" ) )
         elif [[ $cur == -* ]]; then
-            options='--from --dirs --nodirs --move --move-regex --nocontrol --control --controlfiles --wdiff-source-control --no-wdiff-source-control --wp --wl --wt --show-moved --noshow-moved --renamed --exclude --diffstat --no-diffstat --auto-ver-sort --no-auto-ver-sort --unpack-tarballs --no-unpack-tarballs --debs-dir --quiet --ignore-space'
-    
             if [[ $prev == debdiff ]]; then
                 options+=' --no-conf'
             fi

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