mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
executing mvnw, when mvnw-file exists
indriectly enable autocompletion for mvnw
This commit is contained in:
parent
a7fb55cf13
commit
bd9a604790
1 changed files with 13 additions and 0 deletions
|
|
@ -20,6 +20,14 @@ BACKGROUND_CYAN=$(tput setab 6)
|
||||||
BACKGROUND_WHITE=$(tput setab 7)
|
BACKGROUND_WHITE=$(tput setab 7)
|
||||||
RESET_FORMATTING=$(tput sgr0)
|
RESET_FORMATTING=$(tput sgr0)
|
||||||
|
|
||||||
|
# if found a ./mvnw file execute it otherwise execute orignal mvn
|
||||||
|
mvn-or-mvnw() {
|
||||||
|
if [ -f ./mvnw ] ; then
|
||||||
|
./mvnw "$@";
|
||||||
|
else
|
||||||
|
mvn "$@";
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Wrapper function for Maven's mvn command.
|
# Wrapper function for Maven's mvn command.
|
||||||
mvn-color() {
|
mvn-color() {
|
||||||
|
|
@ -40,6 +48,9 @@ mvn-color() {
|
||||||
# Override the mvn command with the colorized one.
|
# Override the mvn command with the colorized one.
|
||||||
#alias mvn="mvn-color"
|
#alias mvn="mvn-color"
|
||||||
|
|
||||||
|
# either use orignal mvn oder the mvn wrapper
|
||||||
|
alias mvn="mvn-or-mvnw"
|
||||||
|
|
||||||
# aliases
|
# aliases
|
||||||
alias mvncie='mvn clean install eclipse:eclipse'
|
alias mvncie='mvn clean install eclipse:eclipse'
|
||||||
alias mvnci='mvn clean install'
|
alias mvnci='mvn clean install'
|
||||||
|
|
@ -274,3 +285,5 @@ function listMavenCompletions {
|
||||||
}
|
}
|
||||||
|
|
||||||
compctl -K listMavenCompletions mvn
|
compctl -K listMavenCompletions mvn
|
||||||
|
compctl -K listMavenCompletions mvn-or-mvnw
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue