[devscripts] 01/01: added plotchangelog bash completion

Nicholas Bamber periapt at moszumanska.debian.org
Thu Dec 10 18:15:19 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 1f50b7a4a8326c782537931abe2a69d64b7d1675
Author: Nicholas Bamber <nicholas at periapt.co.uk>
Date:   Thu Dec 10 18:14:51 2015 +0000

    added plotchangelog bash completion
---
 debian/changelog                      |  3 ++-
 scripts/plotchangelog.bash_completion | 23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 8021791..9ea31d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,7 +20,8 @@ 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, dscverify, dscextract, what-patch and licensecheck
+    list-unreleased, dscverify, dscextract, what-patch, plotchangelog
+	and licensecheck
   * Updated custom bash completion handling for mk-origtargz
   * Added debcheckout to those commands with package names bash completion
   * licensecheck:
diff --git a/scripts/plotchangelog.bash_completion b/scripts/plotchangelog.bash_completion
new file mode 100644
index 0000000..b24e860
--- /dev/null
+++ b/scripts/plotchangelog.bash_completion
@@ -0,0 +1,23 @@
+# Debian plotchangelog(1) completion                             -*- shell-script -*-
+# Copyright: 2015, Nicholas Bamber <nicholas at periapt.co.uk>
+_plotchangelog()
+{
+    local cur prev words cword _options
+    _init_completion || return
+
+	_options='--linecount --bugcount --cumulative --no-version --no-maint --urgency --verbose'
+
+    if [[ $prev == plotchangelog ]]; then
+		_options+=' --no-conf'
+	fi
+
+	_options+=' '
+	_options+=$(find . -name changelog | sed -e's!\.\/!!' |  paste -s -d' ')
+
+    COMPREPLY=( $( compgen -W "${_options}" -- "$cur" ) )
+
+    return 0
+} &&
+complete -F _plotchangelog plotchangelog
+        
+# 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