diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2018-09-10 10:50:45 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2018-09-10 10:50:45 -0600 |
commit | 5ece6ef2f07c58672a9c965dbbbb62a42386fb2d (patch) | |
tree | 285e6382f9e900779bce60da02f1f0d97e467e26 /plugins/mvn/mvn.plugin.zsh | |
parent | 852e7fe005267f74f3c04a4ddbb310522eee8014 (diff) | |
parent | fe5fe81c8cfa66981c51d149a35fe545f2ef5016 (diff) | |
download | zsh-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/mvn/mvn.plugin.zsh')
-rw-r--r-- | plugins/mvn/mvn.plugin.zsh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index d422ba5c7..74583c6dc 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -20,6 +20,15 @@ BACKGROUND_CYAN=$(tput setab 6) BACKGROUND_WHITE=$(tput setab 7) RESET_FORMATTING=$(tput sgr0) +# if found a ./mvnw file execute it otherwise execute orignal mvn +mvn-or-mvnw() { + if [ -f ./mvnw ] ; then + echo "executing mvnw instead of mvn" + ./mvnw "$@"; + else + mvn "$@"; + fi +} # Wrapper function for Maven's mvn command. mvn-color() { @@ -40,6 +49,9 @@ mvn-color() { # Override the mvn command with the colorized one. #alias mvn="mvn-color" +# either use orignal mvn oder the mvn wrapper +alias mvn="mvn-or-mvnw" + # aliases alias mvncie='mvn clean install eclipse:eclipse' alias mvnci='mvn clean install' @@ -276,3 +288,5 @@ function listMavenCompletions { } compctl -K listMavenCompletions mvn +compctl -K listMavenCompletions mvn-or-mvnw + |