mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
Mvn: Add completer for full-form plugins
This commit is contained in:
@@ -210,6 +210,7 @@ _mvn_plugin_prefixes() {
|
||||
(( $+functions[_mvn_full_form_plugin_colon_goals] )) ||
|
||||
_mvn_full_form_plugin_colon_goals() {
|
||||
local ret=1
|
||||
# FIXME Duplicates _mvn_full_form_plugins
|
||||
if compset -P 1 '*:'; then
|
||||
local groupId="${${IPREFIX%:}##*:}"
|
||||
if compset -P 1 '*:'; then
|
||||
@@ -232,6 +233,23 @@ _mvn_full_form_plugin_colon_goals() {
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_mvn_full_form_plugins] )) ||
|
||||
_mvn_full_form_plugins() {
|
||||
local ret=1
|
||||
if compset -P 1 '*:'; then
|
||||
local groupId="${${IPREFIX%:}##*:}"
|
||||
if compset -P 1 '*:'; then
|
||||
local artifactId="${${IPREFIX%:}##*:}"
|
||||
_wanted versions expl "${artifactId} version" _mvn_artifact_versions -qS: "${groupId}:${artifactId}" && ret=0
|
||||
else
|
||||
_wanted artifactIds expl "${groupId} artifactId" _mvn_groupId_artifactIds -qS: $groupId && ret=0
|
||||
fi
|
||||
else
|
||||
_wanted groupIds expl "groupId" _mvn_groupIds -qS: && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_mvn_groupIds] )) ||
|
||||
_mvn_groupIds() {
|
||||
local repository_location=$(__mvn_get_repository_location) update_policy ret=1
|
||||
|
||||
Reference in New Issue
Block a user