diff --git a/etc/zsh/_bloop b/etc/zsh/_bloop index bbad483c29..2617873568 100644 --- a/etc/zsh/_bloop +++ b/etc/zsh/_bloop @@ -52,6 +52,15 @@ _flags_for_cmd() { return 0 } +_tests_or_flags() { + local cmd=${words[2]} + if [[ $words[CURRENT-1] = '--only' && $cmd = "test" ]] then + _testsfqcn + else + _flags + fi +} + _project_or_flags() { local project_cmd=($(bloop autocomplete --format zsh --mode project-commands)) local cmd=${words[2]} @@ -74,6 +83,6 @@ _project_or_flags() { _arguments \ ":command:_commands" \ ":project_or_flags:_project_or_flags" \ - "*::flags:_flags" + "*::flags:_tests_or_flags" return 0