I'm using just 1.58.0 with the dynamic zsh completion script (just --completions zsh). I'd like to ask for feedback on two completion changes before anything else. I realize completion improvements are tracked in #2406; the second item below overlaps with "Handle space-separated paths in arguments", but I didn't see the first one listed.
1. Recipes should win over files and directories
When a recipe and a directory share a name, the directory wins. Given this layout:
.
├── justfile # recipe: http file service=""
└── http/
Typing just ht<Tab> completes to just http/ instead of just http. The generated _clap_dynamic_completer_just adds directory candidates with -S '/' alongside recipes, so zsh picks the directory form. In practice, when I type a partial word right after just, I almost always want a recipe. It would be nice if recipes (and modules) were offered first and file paths were only a fallback, or only offered in positions where a recipe argument is expected. #2961 asked for the same ordering in PowerShell.
2. just <module> <Tab> should list the module's recipes
With mod http, just http::<Tab> works, but just http <Tab> offers the root recipes and files again instead of http's recipes. Since just http sync is a valid way to invoke the recipe, I'd expect completion to follow the same form. The same applies to nested modules (just http deep <Tab>).
For reference, I wrote a local zsh completion function that does both, using just --dump --dump-format json to walk modules and count recipe parameters, so files are only offered once a recipe expects arguments. I'm not suggesting that approach for just itself (it's shell-specific, which #2406 moved away from), but it confirms the behavior is possible and works well for single-file, import, and mod layouts.
Is this something you'd want in the Rust completion logic? Happy to provide more details.
I'm using just 1.58.0 with the dynamic zsh completion script (
just --completions zsh). I'd like to ask for feedback on two completion changes before anything else. I realize completion improvements are tracked in #2406; the second item below overlaps with "Handle space-separated paths in arguments", but I didn't see the first one listed.1. Recipes should win over files and directories
When a recipe and a directory share a name, the directory wins. Given this layout:
Typing
just ht<Tab>completes tojust http/instead ofjust http. The generated_clap_dynamic_completer_justadds directory candidates with-S '/'alongside recipes, so zsh picks the directory form. In practice, when I type a partial word right afterjust, I almost always want a recipe. It would be nice if recipes (and modules) were offered first and file paths were only a fallback, or only offered in positions where a recipe argument is expected. #2961 asked for the same ordering in PowerShell.2.
just <module> <Tab>should list the module's recipesWith
mod http,just http::<Tab>works, butjust http <Tab>offers the root recipes and files again instead ofhttp's recipes. Sincejust http syncis a valid way to invoke the recipe, I'd expect completion to follow the same form. The same applies to nested modules (just http deep <Tab>).For reference, I wrote a local zsh completion function that does both, using
just --dump --dump-format jsonto walk modules and count recipe parameters, so files are only offered once a recipe expects arguments. I'm not suggesting that approach for just itself (it's shell-specific, which #2406 moved away from), but it confirms the behavior is possible and works well for single-file,import, andmodlayouts.Is this something you'd want in the Rust completion logic? Happy to provide more details.