Add gradle completion.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 16 Oct 2013 18:42:07 +0300
changeset 643 9f5ece28cd08
parent 642 8771e26315d6
child 644 5a6d6ad8e7f4
Add gradle completion.
.bash_completion.d/gradle
Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.bash_completion.d/gradle	Wed Oct 16 18:42:07 2013 +0300
@@ -0,0 +1,18 @@
+# -*- mode: sh; sh-shell-file: bash -*-
+
+_gradle()
+{
+   local cmds cur colonprefixes
+   COMPREPLY=()
+   local _help_cmds='dependencies dependencyInsight help projects properties tasks'
+   local _java_cmds='assemble build buildDependents buildNeeded classes compileJava processResources clean cleanTest jar testClasses compileTestJava processTestResources javadoc check test uploadArchives'
+   cur=${COMP_WORDS[COMP_CWORD]}
+   # colonprefixes=${cur%"${cur##*:}"}
+   COMPREPLY=( $(compgen -W '$_help_cmds $_java_cmds'  -- $cur) )
+   # local i=${#COMPREPLY[*]}
+   # while [ $((--i)) -ge 0 ]; do
+   #    COMPREPLY[$i]=${COMPREPLY[$i]#"$colonprefixes"}
+   # done
+   return 0
+} &&
+complete -F _gradle gradle
--- a/Makefile	Wed Oct 09 00:40:42 2013 +0300
+++ b/Makefile	Wed Oct 16 18:42:07 2013 +0300
@@ -42,7 +42,7 @@
 OVERRIDDEN_ITEMS := \
     .fvwm .xxkbrc .xmodmaprc .fonts.conf \
     .inputrc .minttyrc .Xdefaults .xinitrc .xserverrc .screenrc .dircolors \
-    .bashrc .bashenv .bash_completion .zshrc .vimrc .ssh \
+    .bashrc .bashenv .bash_completion .bash_completion.d .zshrc .vimrc .ssh \
     .pylintrc .pystartup .tclshrc \
     .guile \
     .sqshrc \