Repository navigation
Add PowerShell tab completions (0.6.0) - #8
Merged
Merged
Conversation
A fourth generator next to zsh, bash and fish, built from the same COMMANDS table. It registers a native argument completer, so it works in pwsh and Windows PowerShell 5.1, and offers subcommands with their descriptions as tooltips, flags, the --shell, shell-init and completion values, and profile names read with Get-ChildItem when Tab is pressed. Positions the table does not describe fall through to PowerShell's own path completion. Windows PowerShell 5.1 never calls a native completer for a bare -, -- or -x word, as a probe on the Windows runner showed, so there a flag completes from its first letter (--e<Tab>). The README says so and the test asserts both shells' behaviour. A bare claudep completion in PowerShell on Windows now prints the script instead of refusing. test/completion.test.ts drives the completer through TabExpansion2 under pwsh on every OS and under Windows PowerShell 5.1 on Windows, with claudep on PATH: without it each Tab searched PATH and module auto-loading for the command, 17 s under pwsh on the Windows runner. Reopens the PowerShell part of the 2026-09-14 completion decision.
bordoni
force-pushed
the
release/0.6.0
branch
from
October 15, 2026 19:49
c49a254 to
65d1a5a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
claudep completion powershellprints a native argument completer generated from theCOMMANDStable, like the zsh, bash and fish scripts. It completes subcommands (with their descriptions as tooltips), flags, the values--shell,shell-initandcompletiontake, and profile names read withGet-ChildItemwhen Tab is pressed, so bun never starts. Load it from$PROFILE:A bare
claudep completionin PowerShell on Windows now prints this script instead of refusing.What the Windows job found
This PR exists to run Windows PowerShell 5.1 before tagging. Two things came out of it:
claudepon PATH. Without it, eachTabExpansion2call searched PATH and module auto-loading for the command: 17 s under pwsh and past the 30 s limit under 5.1 on the Windows runner. With aclaudepon PATH, as an install has, pwsh takes 0.71 s and 5.1 takes 2.9 s.-,--or-xword. A temporary probe (dropped from the branch) showed 5.1.26100 sends those to its own parameter completion.--eand every non-dash word reach the completer as in pwsh 7.6. The README tells 5.1 users to type the first letter of a flag, and the test asserts each shell's behaviour.CI is green on macOS, Ubuntu and Windows. Once merged,
mainis fast-forwarded to this branch andbun run release minor --pushcuts 0.6.0.Docs
README, help text,
[Unreleased]inCHANGELOG.md,.ref/testing.md, and a 2026-10-14 entry in.ref/design-decisions.mdthat reopens the PowerShell part of the 2026-09-14 completion decision.