diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index 8477722b0..bfb0c2808 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -347,6 +347,13 @@ function listMavenCompletions { ) } -compctl -K listMavenCompletions mvn mvnw -compctl -K listMavenCompletions mvn-color -compctl -K listMavenCompletions mvn-or-mvnw +# Completion, via compsys so that tools built on it (fzf-tab, etc.) can take over. +_mvn() { + local -a commands + listMavenCompletions + # _describe splits entries on `:`, so escape it to keep goals like `dependency:tree`. + commands=("${(@)reply//:/\\:}") + _describe -t mvn-commands 'mvn command' commands +} + +compdef _mvn mvn mvnw mvn-color mvn-or-mvnw