问题描述:

I've recently migrated from a Windows/Eclipse build environment to an Ubuntu/Android Studio setup for my Android projects.

I prefer to use the command line for release builds. In order to see the available tasks, I need to type gradlew tasks on the command line. I then need to remember the option I want, such as gradlew assembleRelease or gradlew installRelease.

Is there any facility, (possibly a script?) which would enable something like Ubuntu's 'hit the tab' feature which allows an auto-completion set of options based on the input so far?

网友答案:

You could try this gist solution https://gist.github.com/nolanlawson/8694399:

download a script

$curl -L -s https://gist.github.com/nolanlawson/8694399/raw/gradle-tab-completion.bash \
  -o ~/gradle-tab-completion.bash

and add to your bash_profile this string:

source ~/gradle-tab-completion.bash
相关阅读:
Top