Skip to content

Fix zsh completion in nested modules#3111

Closed
kitsuyui wants to merge 1 commit intocasey:masterfrom
kitsuyui:fix-zsh-module-completion
Closed

Fix zsh completion in nested modules#3111
kitsuyui wants to merge 1 commit intocasey:masterfrom
kitsuyui:fix-zsh-module-completion

Conversation

@kitsuyui
Copy link
Copy Markdown

@kitsuyui kitsuyui commented Mar 8, 2026

Fixes #2912.

This updates zsh completion so it can continue completing commands inside modules, instead of stopping after the first module segment.

What changed:

  • resolve the current module path from the words already typed by the user
  • use just --list <module> to complete names at the current module level
  • detect fully-qualified recipe paths with just --summary
  • add a zsh regression test covering nested modules

Before this change, completion could stop after the first module name in cases like the one described in #2912, where a command should continue completing deeper module recipes.

Resolve the current module path during zsh completion so completion can
continue inside nested modules instead of stopping after the first module
segment. Add a zsh regression test covering nested module recipes.
@kitsuyui kitsuyui force-pushed the fix-zsh-module-completion branch from a0a1af8 to 5d1b537 Compare March 17, 2026 10:09
@casey
Copy link
Copy Markdown
Owner

casey commented Mar 22, 2026

I switched to using Clap's dynamic completion engine in #3167. The new completion engine calls into the just binary to get completions. This allows us to implement custom completion logic in Rust for all supported shells, instead of having to patch in support for each individual shell.

I created #2406 to track improvements to the new completion engine in one place.

The new completion engine will complete :: separated recipe paths. It doesn't work with space-separated paths, although there's an item in #2406 for that.

@casey casey closed this Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shell completion does not work with modules

2 participants