zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] gradle completion
@ 2013-01-29 11:03 Jesper Nygårds
  0 siblings, 0 replies; only message in thread
From: Jesper Nygårds @ 2013-01-29 11:03 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 163 bytes --]

The attached patch makes the gradle completion avoid a time-consuming task
generation list when not needed, and updates the completion alternatives to
gradle 1.3.

[-- Attachment #1.2: Type: text/html, Size: 214 bytes --]

[-- Attachment #2: gradle.patch --]
[-- Type: application/octet-stream, Size: 3345 bytes --]

diff -ur a/Completion/Unix/Command/_gradle b/Completion/Unix/Command/_gradle
--- a/Completion/Unix/Command/_gradle	2013-01-18 10:07:59.577109800 +0100
+++ b/Completion/Unix/Command/_gradle	2013-01-21 13:21:27.800503800 +0100
@@ -24,7 +24,7 @@
 zstyle -T ":completion:*:*:$service:*" gradle-inspect || gradle_inspect=no
 
 _arguments -C \
-    '(-)'{-\?,-h,--help}'[Shows this help message.]' \
+    '(-)'{-\?,-h,--help}'[Shows a help message.]' \
     {-a,--no-rebuild}'[Do not rebuild project dependencies.]' \
     {-b,--build-file}'[Specifies the build file.]:build file:_files -g "*.gradle(-.)"' \
     {-C,--cache}'[Specifies how compiled build scripts should be cached.]:cache policy:(on rebuild)' \
@@ -45,12 +45,17 @@
     '--offline[The build should operate without accessing network resources.]' \
     \*{-P+,--project-prop}'[Set project property for the build script (e.g. -Pmyprop=myvalue).]:project property (prop=val):' \
     {-p,--project-dir}'[Specifies the start directory for Gradle.]:start directory:_directories' \
+    '--parallel[Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]' \
+    '--parallel-threads[Build projects in parallel, using the specified number of executor threads.]' \
     '--profile[Profiles build execution time and generates a report in the <build_dir>/reports/profile directory.]' \
     '--project-cache-dir[Specifies the project-specific cache directory.]:cache directory:_directories' \
     '(-d --debug -i --info)'{-q,--quiet}'[Log errors only.]' \
-    "--refresh[Refresh the state of resources of the type(s) specified.]:refresh policy:(dependencies)" \
-    '(-s --stacktrace)'{-S,--full-stacktrace}'[Print out the full (very verbose) stacktrace for all exceptions.]' \
+    '--recompile-scripts[Force build script recompiling.]' \
+    '--refresh[Refresh the state of resources of the type(s) specified.]:refresh policy:(dependencies)' \
+    '--refresh-dependencies[Refresh the state of dependencies.]' \
+    '--rerun-tasks[Ignore previously cached task results.]' \
     '(-S --full-stacktrace)'{-s,--stacktrace}'[Print out the stacktrace for all exceptions.]' \
+    '(-s --stacktrace)'{-S,--full-stacktrace}'[Print out the full (very verbose) stacktrace for all exceptions.]' \
     '(-)--stop[Stops the Gradle daemon if it is running.]' \
     {-u,--no-search-upward}"[Don't search in parent folders for a settings.gradle file.]" \
     '(-)'{-v,--version}'[Print version info.]' \
@@ -58,7 +63,7 @@
     '*:task:->task' \
     && ret=0
 
-if [[ -n $state ]]; then
+if [[ $words[CURRENT] != -* ]]; then
     if [[ $gradle_inspect == yes ]]; then
         # If a build file is specified after '-b' or '--build-file', use this file. Otherwise,
         # default is the file 'build.gradle' in the current directory.
@@ -102,7 +107,8 @@
         fi
     else
         _describe 'built-in tasks' '(
-            "dependencies:Displays the dependencies of root project."
+            "dependencies:Displays all dependencies declared in root project."
+            "dependencyInsight:Displays the insight into a specific dependency in root project."
             "help:Displays a help message."
             "projects:Displays the sub-projects of root project."
             "properties:Displays the properties of root project."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-29 13:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-29 11:03 [PATCH] gradle completion Jesper Nygårds

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).