在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):gradle/gradle-completion开源软件地址(OpenSource Url):https://github.com/gradle/gradle-completion开源编程语言(OpenSource Language):Shell 100.0%开源软件介绍(OpenSource Introduction):gradle-completionBash and Zsh completion support for Gradle. This provides fast tab completion for:
It also handles custom default build files, so See instructions for bash or for zsh, then consider optional additional configuration. Here's a demo for the gradle project itself: Installation for Zsh 5.0+HomebrewInstall via
oh-my-zsh pluginInstall asDownload and place the plugin and completion script into your oh-my-zsh plugins directory.
Add
Install manuallyDownload and place
Add the following do your '.zshrc' file:
Start a new terminal session. You may need to disable the (Optional) Manual Completion Cache InitializationCompletion cache initialization happens the first time you invoke completion, and usually takes a few seconds, depending on the size of your project. You can manually initialize the cache and avoid interrupting your development mojo by running: cd path/to/your-project
source ~/.zsh/gradle-completion/_gradle 1>&2 2>/dev/null; __gradle-completion-init Installation for Bash 3.2+HomebrewInstall via
Install manuallyDownload and place
NOTE: Ensure Add the following to your
Start a new terminal session. (Optional) Manual Completion Cache InitializationCompletion cache initialization happens the first time you invoke completion, and usually takes a few seconds, depending on the size of your project. You can manually initialize the cache and avoid interrupting your development mojo by running: cd path/to/your-project
__gradle-completion-init Additional ConfigurationExcluding build scripts from UP-TO-DATE checkTab completion checks known build scripts to see if they've been changed and refreshes the task cache if so. You can exclude build scripts from this check (and speed up completion) by specifying: # Default is `"/(build|integTest|out)/"`
export GRADLE_COMPLETION_EXCLUDE_PATTERN="/(build|integTest|samples|smokeTest|testFixtures|templates|out|features)/"
# Essentially turn off checking for changed scripts
export GRADLE_COMPLETION_EXCLUDE_PATTERN="gradle" Completion cacheOne can manually (re)generate the completion cache by invoking The build script cache is invalidated if any *.gradle or *.gradle.kts files change. However, these completion scripts do not search for new build scripts every time completion is invoked, because that would make completion ~20x slower (unless you have so really good ideas on this). By default, the build script cache is invalidated every 3 weeks (30240 minutes).
You can configure this value by exporting a new value for export GRADLE_CACHE_TTL_MINUTES=$(expr 1440 \* number_of_days_you_want) Implicit TasksGradle allows you to access tasks of subprojects from the project root implicitly. For example, given these tasks:
You can execute gradle-completion will not tab complete these tasks by default because it adds a significant number of completion options, which may not be what you want and negatively impacts completion speed. To allow completion of implicit tasks, set export GRADLE_COMPLETION_UNQUALIFIED_TASKS="true" You may need to invalidate the cache using the cache config above or by executing TroubleshootingIf zsh completion isn't working, first try checking your zsh completion using export PATH=".:$PATH"
If zsh completion reports "Generating Gradle task cache..." every time, the zsh completion cache
may be disabled. Enable it by adding the following to your zstyle ':completion:*' use-cache on ContributingSee the contributing guide. AcknowledgementsBash completion is inspired by Nolan Lawson's Gradle tab completion for bash. Zsh completion is an improved version of zsh's built-in Gradle completion. Current improvements over built-in support:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论