mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Ommiting comments in profiles
This commit is contained in:
parent
f91736491d
commit
2a9c1d07f6
1 changed files with 16 additions and 16 deletions
|
|
@ -20,7 +20,7 @@ export BACKGROUND_CYAN=`tput setab 6`
|
|||
export BACKGROUND_WHITE=`tput setab 7`
|
||||
export RESET_FORMATTING=`tput sgr0`
|
||||
|
||||
|
||||
|
||||
# Wrapper function for Maven's mvn command.
|
||||
mvn-color()
|
||||
{
|
||||
|
|
@ -32,12 +32,12 @@ mvn-color()
|
|||
-e "s/\(\[WARNING\]\)\(.*\)/${BOLD}${TEXT_YELLOW}\1${RESET_FORMATTING}\2/g" \
|
||||
-e "s/\(\[ERROR\]\)\(.*\)/${BOLD}${TEXT_RED}\1${RESET_FORMATTING}\2/g" \
|
||||
-e "s/Tests run: \([^,]*\), Failures: \([^,]*\), Errors: \([^,]*\), Skipped: \([^,]*\)/${BOLD}${TEXT_GREEN}Tests run: \1${RESET_FORMATTING}, Failures: ${BOLD}${TEXT_RED}\2${RESET_FORMATTING}, Errors: ${BOLD}${TEXT_RED}\3${RESET_FORMATTING}, Skipped: ${BOLD}${TEXT_YELLOW}\4${RESET_FORMATTING}/g"
|
||||
|
||||
|
||||
# Make sure formatting is reset
|
||||
echo -ne ${RESET_FORMATTING}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# Override the mvn command with the colorized one.
|
||||
#alias mvn="mvn-color"
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ alias mvnct='mvn clean test'
|
|||
alias mvnt='mvn test'
|
||||
alias mvnag='mvn archetype:generate'
|
||||
alias mvn-updates='mvn versions:display-dependency-updates'
|
||||
alias mvntc7='mvn tomcat7:run'
|
||||
alias mvntc7='mvn tomcat7:run'
|
||||
alias mvntc='mvn tomcat:run'
|
||||
alias mvnjetty='mvn jetty:run'
|
||||
alias mvndt='mvn dependency:tree'
|
||||
|
|
@ -79,7 +79,7 @@ function _realpath {
|
|||
fi
|
||||
else
|
||||
# file *cannot* exist
|
||||
return 1 # failure
|
||||
return 1 # failure
|
||||
fi
|
||||
|
||||
# reassemble realpath
|
||||
|
|
@ -98,13 +98,13 @@ function __pom_hierarchy {
|
|||
## <parent> is present but not defined. Asume ../pom.xml
|
||||
if [ -z "$new_file" ]; then
|
||||
new_file="../pom.xml"
|
||||
fi
|
||||
fi
|
||||
|
||||
## if file exists continue else break
|
||||
new_pom=`_realpath "${file%/*}/$new_file"`
|
||||
if [ -n "$new_pom" ]; then
|
||||
if [ -n "$new_pom" ]; then
|
||||
file=$new_pom
|
||||
else
|
||||
else
|
||||
break
|
||||
fi
|
||||
POM_HIERARCHY+=("$file")
|
||||
|
|
@ -117,16 +117,16 @@ function listMavenCompletions {
|
|||
local profiles=()
|
||||
#current pom profiles
|
||||
for item in ${POM_HIERARCHY[*]}; do
|
||||
profiles=($profiles `[ -e $item ] && grep -e "<profile>" -A 1 $item | grep -e "<id>.*</id>" | sed 's?.*<id>\(.*\)<\/id>.*?-P\1?'`)
|
||||
profiles=($profiles `[ -e $item ] && cat $item | sed 's/<!--.*-->//' | sed '/<!--/,/-->/d' | grep -e "<profile>" -A 1 | grep -e "<id>.*</id>" | sed 's?.*<id>\(.*\)<\/id>.*?-P\1?'`)
|
||||
done
|
||||
|
||||
reply=(
|
||||
# common lifecycle
|
||||
clean process-resources compile process-test-resources test-compile test package verify install deploy site
|
||||
|
||||
|
||||
# common plugins
|
||||
deploy failsafe install site surefire checkstyle javadoc jxr pmd ant antrun archetype assembly dependency enforcer gpg help release repository source eclipse idea jetty cargo jboss tomcat tomcat6 tomcat7 exec versions war ear ejb android scm buildnumber nexus repository sonar license hibernate3 liquibase flyway gwt
|
||||
|
||||
|
||||
# deploy
|
||||
deploy:deploy-file
|
||||
# failsafe
|
||||
|
|
@ -137,7 +137,7 @@ function listMavenCompletions {
|
|||
site:site site:deploy site:run site:stage site:stage-deploy
|
||||
# surefire
|
||||
surefire:test
|
||||
|
||||
|
||||
# checkstyle
|
||||
checkstyle:checkstyle checkstyle:check
|
||||
# javadoc
|
||||
|
|
@ -169,12 +169,12 @@ function listMavenCompletions {
|
|||
repository:bundle-create repository:bundle-pack
|
||||
# source
|
||||
source:aggregate source:jar source:jar-no-fork
|
||||
|
||||
|
||||
# eclipse
|
||||
eclipse:clean eclipse:eclipse
|
||||
# idea
|
||||
idea:clean idea:idea
|
||||
|
||||
|
||||
# jetty
|
||||
jetty:run jetty:run-exploded
|
||||
# cargo
|
||||
|
|
@ -228,8 +228,8 @@ function listMavenCompletions {
|
|||
# arguments
|
||||
-am -amd -B -C -c -cpu -D -e -emp -ep -f -fae -ff -fn -gs -h -l -N -npr -npu -nsu -o -pl -q -rf -s -T -t -U -up -V -v -X
|
||||
|
||||
cli:execute cli:execute-phase
|
||||
archetype:generate generate-sources
|
||||
cli:execute cli:execute-phase
|
||||
archetype:generate generate-sources
|
||||
cobertura:cobertura
|
||||
-Dtest= `if [ -d ./src/test/java ] ; then find ./src/test/java -type f -name '*.java' | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dtest=\1?' ; fi`
|
||||
$profiles
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue