summaryrefslogtreecommitdiff
path: root/plugins/gradle/gradle.plugin.zsh
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2018-09-10 10:50:45 -0600
committerTuowen Zhao <ztuowen@gmail.com>2018-09-10 10:50:45 -0600
commit5ece6ef2f07c58672a9c965dbbbb62a42386fb2d (patch)
tree285e6382f9e900779bce60da02f1f0d97e467e26 /plugins/gradle/gradle.plugin.zsh
parent852e7fe005267f74f3c04a4ddbb310522eee8014 (diff)
parentfe5fe81c8cfa66981c51d149a35fe545f2ef5016 (diff)
downloadzsh-5ece6ef2f07c58672a9c965dbbbb62a42386fb2d.tar.gz
zsh-5ece6ef2f07c58672a9c965dbbbb62a42386fb2d.tar.bz2
zsh-5ece6ef2f07c58672a9c965dbbbb62a42386fb2d.zip
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/gradle/gradle.plugin.zsh')
-rw-r--r--plugins/gradle/gradle.plugin.zsh12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh
index c7047552d..8df62c2e2 100644
--- a/plugins/gradle/gradle.plugin.zsh
+++ b/plugins/gradle/gradle.plugin.zsh
@@ -1,6 +1,18 @@
##############################################################################
# A descriptive listing of core Gradle commands
############################################################################
+
+gradle-or-gradlew() {
+ if [ -f ./gradlew ] ; then
+ echo "executing gradlew instead of gradle";
+ ./gradlew "$@";
+ else
+ gradle "$@";
+ fi
+}
+
+alias gradle=gradle-or-gradlew;
+
function _gradle_core_commands() {
local ret=1 state
_arguments ':subcommand:->subcommand' && ret=0