Completion for "dependencies --configuration".
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 21 Feb 2017 13:31:02 +0200
changeset 835 b2e3e02b9259
parent 834 31202b672717
child 836 ed2feb95716d
Completion for "dependencies --configuration".
.bash_completion.d/gradle
--- a/.bash_completion.d/gradle	Tue Feb 21 10:06:40 2017 +0200
+++ b/.bash_completion.d/gradle	Tue Feb 21 13:31:02 2017 +0200
@@ -27,6 +27,28 @@
     wrapper)
       COMPREPLY=( $(compgen -W "--gradle-version" -- "$cur") )
       return ;;
+    dependencies)
+      COMPREPLY=( $(compgen -W "--configuration" -- "$cur") )
+      return ;;
+    --configuration)
+      local _configs="archives              - Configuration for archive artifacts.
+compile               - Compile time dependencies.
+compileClasspath      - Compile classpath, used when compiling source.
+compileOnly           - Compile time only dependencies, not used at runtime.
+default               - Dependencies required by this project at runtime.
+optional              -
+provided              -
+runtime               - Runtime dependencies for source set 'main'.
+testCompile           - Dependencies for source set 'test'.
+testCompileClasspath  - Compile classpath for source set 'test'.
+testCompileOnly       - Compile dependencies for source set 'test'.
+testRuntime           - Runtime dependencies for source set 'test'."
+      local IFS=$'\n'
+      COMPREPLY=( $(compgen -W '${_configs}' -- "$cur") )
+      if [[ ${#COMPREPLY[@]} -le 1 ]]; then
+          COMPREPLY=( ${COMPREPLY[0]%% *-*} )
+      fi
+      return ;;
     --task)
       COMPREPLY=( $(compgen -W '$_help_cmds $_java_cmds $_application_cmds $_other_cmd'  -- $cur) )
       return ;;