Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
3cd8eaf9
Commit
3cd8eaf9
authored
Aug 29, 2018
by
Janosch Schwalm
Committed by
Robby Russell
Aug 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
execute mvnw with "mvn" when mvnw-file is present (#6484)
* executing mvnw, when mvnw-file exists indriectly enable autocompletion for mvnw * inform the user :)
parent
84aa2746
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
mvn.plugin.zsh
plugins/mvn/mvn.plugin.zsh
+14
-0
No files found.
plugins/mvn/mvn.plugin.zsh
View file @
3cd8eaf9
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment