[DRE-commits] [rake] 02/03: bash completion: Improve speed and accuracy with colons
Antonio Terceiro
terceiro at moszumanska.debian.org
Mon Sep 15 22:25:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository rake.
commit bb0bcaebb061b9ff14cd7fc7159b823c862f5657
Author: Antonio Terceiro <terceiro at debian.org>
Date: Mon Sep 15 19:01:21 2014 -0300
bash completion: Improve speed and accuracy with colons
---
debian/bash_completion.d/rake | 12 ++++++++----
debian/changelog | 11 ++++++-----
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/debian/bash_completion.d/rake b/debian/bash_completion.d/rake
index 18d0a6c..b26863a 100644
--- a/debian/bash_completion.d/rake
+++ b/debian/bash_completion.d/rake
@@ -45,10 +45,14 @@ _rake()
[ ! -f $rakef ] && return 0
- COMPREPLY=( $( rake -s -f "$rakef" -T | \
- awk -F ' ' '/^rake / { print $2 }' | \
- command grep "^$cur" ))
-
+ _get_comp_words_by_ref -n : cur
+ more_recent=`ls -1t .rake_tasks~ $rafefile */*/*.rake 2>/dev/null | head -n 1`
+ if [ "$more_recent" != ".rake_tasks~" ]; then
+ rake -T | awk '{print($2)}' > .rake_tasks~
+ fi
+ tasks=$(cat .rake_tasks~)
+ COMPREPLY=($(compgen -W "$tasks" -- "$cur"))
+ __ltrim_colon_completions "$cur"
fi
}
have rake && complete -F _rake $filenames rake
diff --git a/debian/changelog b/debian/changelog
index ab80dd4..62bd7c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,14 +11,15 @@ rake (10.3.2-1) unstable; urgency=medium
* refreshed patches
* added new BD: ruby-hoe
* removed DH_RUBY_IGNORE_TESTS (unnecessary now)
- * build RDocs and install as separate package rake-doc
- - new binary package rake-doc
- - build all RDoc documentation
- - register documentation with doc-base
- - remove embedded jquery, link to system jquery (requires bdep libjs-jquery)
* updated and revised manpage, submitted upstream (Closes: #755845)
* bumped dh, compat to 9
+ [ Antonio Terceiro ]
+ * bash completion: Improve speed and accuracy with colons in task names by
+ borrowing some ideas from https://github.com/ai/rake-completion. Too bad
+ they never tried to improve the completion included in this package
+ instead.
+
-- Caitlin Matos <caitlin.matos at zoho.com> Thu, 28 Aug 2014 12:01:27 -0400
rake (10.1.1-1) unstable; urgency=medium
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/rake.git
More information about the Pkg-ruby-extras-commits
mailing list