Skip to content

Improve PowerShell recipe completions#3082

Closed
abdalmoniem wants to merge 3 commits intocasey:masterfrom
abdalmoniem:powershell_completions_improvement
Closed

Improve PowerShell recipe completions#3082
abdalmoniem wants to merge 3 commits intocasey:masterfrom
abdalmoniem:powershell_completions_improvement

Conversation

@abdalmoniem
Copy link
Copy Markdown

@abdalmoniem abdalmoniem commented Feb 3, 2026

Extend PowerShell completions to show recipe names, arguments, descriptions, and aliases, bringing them in line with zsh completions.

also moved use [System.Management.Automation] inside the Register-ArgumentCompleter block so users can do:

just --completions powershell >> $PROFILE

without getting errors about use statements not being before any other statements.

image

@abdalmoniem abdalmoniem force-pushed the powershell_completions_improvement branch from 848f98f to ce32a75 Compare February 5, 2026 16:57
Extend PowerShell completions to show recipe names, arguments,
descriptions, and aliases, bringing them in line with zsh completions.

Change-Id: I24a00bca98124754c4857c9b25ebc3cfe260fa31
Signed-off-by: AbdAlMoniem AlHifnawy <hifnawy_moniem@hotmail.com>
Change-Id: I1394fbb9d2178b2436997decef7760fefeac103b
in powershell 5, the Test-Path function crashes if its string
parameter's length is zero (empty string). this commit fixes this crash
by adding a length check for $justFileLocation to short circuit the
condition if $justFileLocation is empty.

Change-Id: Ic5f3e8628c011cb9e5b4d6e9b60c703691e03f80
@abdalmoniem abdalmoniem force-pushed the powershell_completions_improvement branch from ce32a75 to a6c623a Compare February 5, 2026 17:00
@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.

I think most of this works with the new completion engine, but please comment in #2406 if anything is missing.

@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.

2 participants