-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_maven-completion.bash
606 lines (540 loc) · 18.7 KB
/
_maven-completion.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
#
# Bash completion for MAVEN
#
# RECOMMENDED: xsltproc or xpath (or msxsl.exe on Windows)
#
# AUTHOR: Ralf Schandl
# Based on work by Juven Xu. See https://github.com/juven/maven-bash-completion
#
# ----------------------------------------------------------------------------
# shellcheck shell=bash
_mvn_has_xsltproc="$(type -P xsltproc 2>/dev/null)"
_mvn_has_xpath="$(type -P xpath 2>/dev/null)"
_mvn_has_yq="$(type -P yq 2>/dev/null)"
_mvn_has_msxsl="$(type -P msxsl.exe 2>/dev/null)"
# on Git For Windows xsltproc is available, but might not work
if ! xsltproc --version >/dev/null 2>&1; then
_mvn_has_xsltproc=''
fi
# We need yq v4.*
if ! yq --version | grep -e 'v[456789]\.' >/dev/null 2>&1; then
_mvn_has_yq=''
fi
# disable xpath for msys (e.g. Git Bash on Windows)
# The PATH expansion feature might destroy xpath expressions
# and xpath is slow anyway.
if [ "$OSTYPE" = "msys" ]; then
_mvn_has_xpath=''
fi
case ${mvn_completion_parser:-UNSET} in
msxsl)
_mvn_has_xsltproc=''
;;
yq)
_mvn_has_xsltproc=''
_mvn_has_msxsl=''
;;
xpath)
_mvn_has_xsltproc=''
_mvn_has_msxsl=''
_mvn_has_yq=''
;;
grep)
_mvn_has_xsltproc=''
_mvn_has_msxsl=''
_mvn_has_yq=''
_mvn_has_xpath=''
;;
UNSET) : ;;
*)
echo >&2 "maven-completion: Invalid value for mvn_completion_parser: $mvn_completion_parser - IGNORED"
;;
esac
#mvc_debug()
#{
# echo "$@" >> $HOME/maven-completion.log
#}
#---------[ Make sure some standart functions exist ]--------------------------
_mvn_function_exists()
{
declare -F "$1" > /dev/null
return $?
}
_mvn_function_exists _get_comp_words_by_ref ||
_get_comp_words_by_ref ()
{
local exclude cur_ words_ cword_;
if [ "$1" = "-n" ]; then
exclude=$2;
shift 2;
fi;
__git_reassemble_comp_words_by_ref "$exclude";
cur_=${words_[cword_]};
while [ $# -gt 0 ]; do
case "$1" in
cur)
cur=$cur_
;;
prev)
prev=${words_[$cword_-1]}
;;
words)
# shellcheck disable=SC2034
words=("${words_[@]}")
;;
cword)
# shellcheck disable=SC2034
cword=$cword_
;;
esac;
shift;
done
}
_mvn_function_exists __ltrim_colon_completions ||
__ltrim_colon_completions()
{
if [[ "$1" == *:* && "$COMP_WORDBREAKS" == *:* ]]; then
# Remove colon-word prefix from COMPREPLY items
local colon_word=${1%"${1##*:}"}
local i=${#COMPREPLY[*]}
while [[ $((--i)) -ge 0 ]]; do
COMPREPLY[$i]=${COMPREPLY[$i]#"$colon_word"}
done
fi
}
unset -f _mvn_function_exists
#---------[ POM parsing functions ]--------------------------------------------
# Either using xslt (xsltproc or msxsl) or yq or (as fallback) grep etc
if [ -n "${_mvn_has_xsltproc}" ]; then
__mvn_get_module_poms()
{
xsltproc - "$1" << EOF
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://maven.apache.org/POM/4.0.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:for-each select="//m:modules/m:module">
<xsl:value-of select="text()"/><xsl:text>/pom.xml
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
EOF
}
__mvn_get_pom_profiles()
{
xsltproc - "$@" << EOF
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://maven.apache.org/POM/4.0.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:for-each select="/m:project/m:profiles/m:profile/m:id">
<xsl:value-of select="text()"/><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
EOF
}
__mvn_get_parent_pom_path()
{
xsltproc - "$1" << EOF
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://maven.apache.org/POM/4.0.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="/m:project/m:parent">
<xsl:choose>
<xsl:when test="./m:relativePath">
<xsl:value-of select="./m:relativePath/text()"/><xsl:text>
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>../pom.xml
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
EOF
}
__mvn_get_settings_profiles()
{
[ -e "$HOME/.m2/settings.xml" ] && xsltproc - "$HOME/.m2/settings.xml" << EOF
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://maven.apache.org/POM/4.0.0"
xmlns:set="http://maven.apache.org/SETTINGS/1.0.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:for-each select="/set:settings/set:profiles/set:profile/set:id">
<xsl:value-of select="text()"/><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
EOF
}
elif [ -n "$_mvn_has_msxsl" ]; then
__mvn_get_module_poms()
{
msxsl "$1" - << EOF | tr -d '\r'
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://maven.apache.org/POM/4.0.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:for-each select="//m:modules/m:module">
<xsl:value-of select="text()"/><xsl:text>/pom.xml
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
EOF
}
__mvn_get_pom_profiles()
{
local fn
for fn in "$@"; do
msxsl "$fn" - << EOF | tr -d '\r'
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://maven.apache.org/POM/4.0.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:for-each select="/m:project/m:profiles/m:profile/m:id">
<xsl:value-of select="text()"/><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
EOF
done
}
__mvn_get_parent_pom_path()
{
msxsl "$1" - << EOF | tr -d '\r'
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://maven.apache.org/POM/4.0.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="/m:project/m:parent">
<xsl:choose>
<xsl:when test="./m:relativePath">
<xsl:value-of select="./m:relativePath/text()"/><xsl:text>
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>../pom.xml
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
EOF
}
__mvn_get_settings_profiles()
{
[ -e "$HOME/.m2/settings.xml" ] && msxsl "$HOME/.m2/settings.xml" - << EOF | tr -d '\r'
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://maven.apache.org/POM/4.0.0"
xmlns:set="http://maven.apache.org/SETTINGS/1.0.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:for-each select="/set:settings/set:profiles/set:profile/set:id">
<xsl:value-of select="text()"/><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
EOF
}
elif [ -n "$_mvn_has_yq" ]; then
__mvn_get_module_poms()
{
yq -px -oy '.. | select(has("modules")) | .modules.module |= (select(tag == "!!seq") // [.]) | .modules.module[]' "$1" | grep -v '^\(---\|null\)$' | sed 's/$/\/pom.xml/'
}
__mvn_get_pom_profiles()
{
yq -px -oy '.project.profiles.profile |= (select(tag == "!!seq") // [.]) | .project.profiles.profile[] | .id' "$@" | grep -v '^\(---\|null\)$'
}
__mvn_get_parent_pom_path()
{
local parent
if [ "$(yq -px -oy '.project.parent' "$1")" != "null" ]; then
parent="$(yq -px -oy '.project.parent.relativePath' "$1")"
[ "$parent" = "null" ] && parent='../pom.xml'
echo "$parent"
else
return 0
fi
}
__mvn_get_settings_profiles()
{
if [ -e "$HOME/.m2/settings.xml" ]; then
yq -px -oy '.settings.profiles.profile |= (select(tag == "!!seq") // [.]) | .settings.profiles.profile[] | .id' "$HOME/.m2/settings.xml" | grep -v '^\(---\|null\)$'
fi
}
elif [ -n "$_mvn_has_xpath" ]; then
__mvn_get_module_poms()
{
xpath -q -e '//modules/module/text()' "$1" | sed 's/$/\/pom.xml/'
}
__mvn_get_pom_profiles()
{
xpath -q -e '/project/profiles/profile/id/text()' "$@"
}
__mvn_get_parent_pom_path()
{
local parent
if [ -n "$(xpath -q -e '/project/parent' "$1" 2>/dev/null)" ]; then
parent=$(xpath -q -e '/project/parent/relativePath/text()' "$1")
[ -z "$parent" ] && parent='../pom.xml'
echo "$parent"
else
return 0
fi
}
__mvn_get_settings_profiles()
{
[ -e "$HOME/.m2/settings.xml" ] && xpath -q -e '/settings/profiles/profile/id/text()' "$HOME/.m2/settings.xml"
}
else
#
# Fallback using grep and friends. This is "best effort".
# It requires that every tag is on its own line.
# And it doesn't know XML comments!
#
__mvn_clean_pom()
{
# remove comments
sed 's/<!--.*-->//g;/<!--/,/-->/d' "$@"
}
__mvn_get_module_poms()
{
__mvn_clean_pom "$1" | grep "<module>" | sed 's/<[^>]*>//g;s/$/\/pom.xml/' | tr -d ' \t'
}
__mvn_get_pom_profiles()
{
__mvn_clean_pom "$@" | grep -A2 '<profile>' | grep '<id>' | sed 's/<[^>]*>//g' | tr -d ' \t'
}
__mvn_get_parent_pom_path()
{
local parent pom
parent="$(__mvn_clean_pom "$1" | sed -n '/<parent>/,/<\/parent>/p')"
if [ -n "$parent" ]; then
pom="$(echo "$parent" | grep "<relativePath>" | sed 's/<[^>]*>//g' | tr -d ' \t')"
[ -z "$pom" ] && pom='../pom.xml'
echo "$pom"
else
return 0
fi
}
__mvn_get_settings_profiles()
{
[ -e "$HOME/.m2/settings.xml" ] && __mvn_get_pom_profiles "$HOME/.m2/settings.xml"
}
fi
unset _mvn_has_xpath
unset _mvn_has_yq
unset _mvn_has_xsltproc
unset _mvn_has_msxsl
#---------[ Not parsing functions ]--------------------------------------------
__mvn_get_poms_recursive()
{
[ ! -e "$1" ] && return
echo "$1"
# shellcheck disable=SC2155
local modules=$( __mvn_get_module_poms "$1" | sed "s%^%$(dirname "$1")/%")
#mvc_debug "recModules: >>$modules<<"
for m in $modules; do
__mvn_get_poms_recursive "$m"
done
}
__mvn_get_parent_poms()
{
local parent
[ ! -e "$1" ] && return
# shellcheck disable=SC2155
local parent=$(__mvn_get_parent_pom_path "$1")
if [ -z "$parent" ]; then
return
fi
parent="$(dirname "$1")/$parent"
if [ ! -e "$parent" ]; then
#mvc_debug "does not exist: $parent"
return
fi
__mvn_get_parent_poms "$parent"
echo "$parent"
}
__mvn_get_profiles()
{
[ -n "${mvn_completion_no_parsing:-}" ] && return
if [ -z "$__mvn_last_pom_profiles" ]; then
local IFS profs modules
mapfile -t modules < <(__mvn_get_poms_recursive "$1" | sort -u)
mapfile -t parents < <(__mvn_get_parent_poms "$1" | sort -u)
#mvc_debug "modules: $modules"
mapfile -t profs < <(__mvn_get_pom_profiles "${modules[@]}" "${parents[@]}" | sort -u)
mapfile -O "${#profs[@]}" -t profs < <(__mvn_get_settings_profiles | sort -u)
IFS='|' __mvn_last_pom_profiles="${profs[*]}"
fi
echo "$__mvn_last_pom_profiles"
}
__mvn_filter_array()
{
local match="$1"
shift
for str in "$@"; do
if [[ $str = ${match}* ]]; then
echo "$str"
fi
done
}
__mvn_plugin_goal()
{
local plugin goals suffix
local plugin_dir=${mvn_completion_ext_dir:-$HOME/.maven-completion.d}
if [[ ${cur} == *:* ]] ; then
local plugin="${cur%:*}"
if [ -n "${__mvn_comp_exts["$plugin"]}" ]; then
# shellcheck disable=SC2155
local goals="$("$plugin_dir/${__mvn_comp_exts[$plugin]}" goals | sed "s/^/$plugin:/;s/|/|$plugin:/g")"
suffix=' '
else
# shellcheck disable=SC2155
local goals="$(__mvn_filter_array "$cur" "${!__mvn_comp_exts[@]}")"
suffix=':'
fi
if [ -n "$goals" ]; then
mapfile -t COMPREPLY < <(compgen -W "${goals}" -S "$suffix" -- "${cur}")
else
COMPREPLY=( '' )
fi
else
mapfile -O "${#COMPREPLY[@]}" -t COMPREPLY < <(compgen -W "${!__mvn_comp_exts[*]}" -S ':' -- "${cur}")
fi
}
__mvn_init()
{
unset __mvn_comp_exts
typeset -gA __mvn_comp_exts
local plugin_dir=${mvn_completion_ext_dir:-$HOME/.maven-completion.d}
if [ -d "$plugin_dir" ]; then
# shellcheck disable=SC2012
if [ "$(ls -tr "$plugin_dir" 2>/dev/null| tail -n1)" != "mc-ext.cache" ]; then
true > "$plugin_dir/mc-ext.cache"
for pi in "$plugin_dir/"*.mc-ext; do
for al in $($pi register); do
#echo >&2 "Registering: >>$al<<"
echo "__mvn_comp_exts[\"$al\"]=\"$(basename "$pi")\"" >> "$plugin_dir/mc-ext.cache"
done 2>/dev/null
done
fi
# shellcheck disable=SC1090,SC1091
. "$plugin_dir/mc-ext.cache"
fi
__mvn_inited="true"
}
_mvn()
{
if [ "${COMP_LINE:-UnSet}" = "UnSet" ]; then
echo "extensible-maven-completion v0.1.0"
return
fi
local cur prev
COMPREPLY=()
_get_comp_words_by_ref -n : cur prev
# Register plugins on first run
if [ -z "$__mvn_inited" ]; then
__mvn_init
fi
local opts="-am|-amd|-B|-C|-c|-cpu|-D|-e|-emp|-ep|-f|-fae|-ff|-fn|-gs|-h|-l|-N|-npr|-npu|-nsu|-o|-P|-pl|-q|-rf|-s|-T|-t|-U|-up|-V|-v|-X"
local long_opts="--also-make|--also-make-dependents|--batch-mode|--strict-checksums|--lax-checksums|--check-plugin-updates|--define|--errors|--encrypt-master-password|--encrypt-password|--file|--fail-at-end|--fail-fast|--fail-never|--global-settings|--help|--log-file|--non-recursive|--no-plugin-registry|--no-plugin-updates|--no-snapshot-updates|--offline|--activate-profiles|--projects|--quiet|--resume-from|--settings|--threads|--toolchains|--update-snapshots|--update-plugins|--show-version|--version|--debug"
local common_clean_lifecycle="pre-clean|clean|post-clean"
local common_default_lifecycle="validate|initialize|generate-sources|process-sources|generate-resources|process-resources|compile|process-classes|generate-test-sources|process-test-sources|generate-test-resources|process-test-resources|test-compile|process-test-classes|test|prepare-package|package|pre-integration-test|integration-test|post-integration-test|verify|install|deploy"
local common_site_lifecycle="pre-site|site|post-site|site-deploy"
local common_lifecycle_phases="${common_clean_lifecycle}|${common_default_lifecycle}|${common_site_lifecycle}"
local options="-Dmaven.test.skip=true |-DskipTests |-DskipITs |-Dmaven.surefire.debug |-DenableCiProfile |-Dpmd.skip=true |-Dcheckstyle.skip=true |-Dtycho.mode=maven |-Dmaven.javadoc.skip=true |-Dgwt.compiler.skip |-Drestart |-Dtest.project.only |-DfullDeployment=true "
#local profile_settings=$(__mvn_get_settings_profiles | tr '\n' '|' )
local fqPom
fqPom=$(readlink -f pom.xml)
if [ ! -e "$fqPom" ]; then
# reset cache
unset __mvn_last_pom_profiles
unset __mvn_last_pom
elif [ "$fqPom" != "$__mvn_last_pom" ]; then
# reset cache
__mvn_last_pom=$fqPom
unset __mvn_last_pom_profiles
fi
#local profiles="${profile_settings}|${__mvn_last_pom_profiles}"
local IFS=$'|\n'
if [[ ${cur} == -D* ]] ; then
local pl_options=''
local prev_parts part pl gl part
local plugin_dir=${mvn_completion_ext_dir:-$HOME/.maven-completion.d}
IFS=" " read -r -a prev_parts <<< "$COMP_LINE"
for part in "${prev_parts[@]}"; do
local pl="${part%:*}"
local gl="${part##*:}"
if [ -n "${__mvn_comp_exts[$pl]}" ]; then
pl_options="${pl_options}$("$plugin_dir/${__mvn_comp_exts[$pl]}" goalopts "$gl")"
fi
done
pl_options="${options}${pl_options}"
mapfile -t COMPREPLY < <(compgen -W "${pl_options%|}" -- "${cur}")
elif [[ ${cur} == -P* ]] ; then
cur=${cur:2}
# shellcheck disable=SC2155
local profiles=$(__mvn_get_profiles pom.xml)
__mvn_last_pom_profiles="$profiles"
if [[ ${cur} == *,* ]] ; then
mapfile -t COMPREPLY < <(compgen -S ',' -W "${profiles}" -P "-P${cur%,*}," -- "${cur##*,}")
else
mapfile -t COMPREPLY < <(compgen -S ',' -W "${profiles}" -P "-P" -- "${cur}")
fi
elif [[ ${prev} == -P || ${prev} == --activate-profiles ]] ; then
# shellcheck disable=SC2155
local profiles=$(__mvn_get_profiles pom.xml)
__mvn_last_pom_profiles="$profiles"
if [[ ${cur} == *,* ]] ; then
mapfile -t COMPREPLY < <(compgen -S ',' -W "${profiles}" -P "${cur%,*}," -- "${cur##*,}")
else
mapfile -t COMPREPLY < <(compgen -S ',' -W "${profiles}" -- "${cur}")
fi
elif [[ ${cur} == --* ]] ; then
mapfile -t COMPREPLY < <(compgen -W "${long_opts}" -S ' ' -- "${cur}")
elif [[ ${cur} == -* ]] ; then
mapfile -t COMPREPLY < <(compgen -W "${opts}" -S ' ' -- "${cur}")
elif [[ ${prev} == -pl ]] ; then
if [[ ${cur} == *,* ]] ; then
mapfile -t COMPREPLY < <(compgen -d -S ',' -P "${cur%,*}," -- "${cur##*,}")
else
mapfile -t COMPREPLY < <(compgen -d -S ',' -- "${cur}")
fi
elif [[ ${prev} == -rf || ${prev} == --resume-from ]] ; then
mapfile -t COMPREPLY < <(compgen -d -S ' ' -- "${cur}")
elif [[ ${cur} == *:* ]] ; then
__mvn_plugin_goal "${cur}"
else
if echo "${common_lifecycle_phases}" | tr '|' '\n' | grep -q -e "^${cur}" ; then
mapfile -t COMPREPLY < <(compgen -S ' ' -W "${common_lifecycle_phases}" -- "${cur}")
fi
__mvn_plugin_goal "${cur}"
fi
__ltrim_colon_completions "$cur"
}
function mvn_comp_reset()
{
unset __mvn_last_pom
unset __mvn_last_pom_profiles
unset __mvn_inited
__mvn_init
}
complete -o default -F _mvn -o nospace mvn
complete -o default -F _mvn -o nospace mvnrecursive
complete -o default -F _mvn -o nospace mvnDebug
# vim:ft=sh: