1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 05:40:08 +00:00

Fixes gradle autocomplete. Regex did not include subproject tasks before.

This commit is contained in:
Matthew Ziegelbaum 2015-04-25 16:08:26 -04:00
parent d485044169
commit 551d68ad11

View file

@ -72,7 +72,7 @@ _gradle_tasks () {
if [ in_gradle ]; then
_gradle_arguments
if _gradle_does_task_list_need_generating; then
gradle tasks --all | grep "^[ ]*[a-zA-Z0-9]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
gradle tasks --all | grep "^[ ]*[a-zA-Z0-9:]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
fi
compadd -X "==== Gradle Tasks ====" `cat .gradletasknamecache`
fi
@ -82,7 +82,7 @@ _gradlew_tasks () {
if [ in_gradle ]; then
_gradle_arguments
if _gradle_does_task_list_need_generating; then
gradlew tasks --all | grep "^[ ]*[a-zA-Z0-9]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
gradlew tasks --all | grep "^[ ]*[a-zA-Z0-9:]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
fi
compadd -X "==== Gradlew Tasks ====" `cat .gradletasknamecache`
fi