formatted maven completion and used helper function

pull/1782/head
Gurkirat Singh 2021-01-10 19:29:21 +05:30
parent 4ca22e9908
commit 9e483a9d78
No known key found for this signature in database
GPG Key ID: CFD64E1DCB3DA835
1 changed files with 35 additions and 30 deletions

View File

@ -1,8 +1,10 @@
#!/usr/bin/env bash
# Bash Maven completion
_mvn()
{
if _command_exists mnv
then
function __maven_completions()
{
local cmds cur colonprefixes
cmds="clean validate compile test package integration-test \
verify install deploy test-compile site generate-sources \
@ -32,5 +34,8 @@ _mvn()
done
return 0
} &&
complete -F _mvn mvn
}
complete -F __maven_completions mvn
fi