feat(completion): add PowerShell shell integration#67
Open
jganoff wants to merge 3 commits into
Open
Conversation
Adds wsp completion powershell output: a wsp function wrapper and a Register-ArgumentCompleter scriptblock. Uses non-native registration so the completer fires for the function, not just external executables. Handles PS 5.1's empty-arg-drop bug via the --% stop-parsing token. Includes shell-spawning integration tests on both Windows (powershell.exe) and Unix (bash). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix New-Item help text indentation (used \x20\x20 to survive Rust line-continuation whitespace stripping) - Fix wsp new and wsp recover to skip flag args when finding workspace name to cd into (same pattern as wsp rm) - Replace Invoke-Expression in non-empty completion branch with direct & binary -- @tokens using CommandElements, preventing $() injection via user-typed argument values - Scope $argStr + cursor-truncation inside the empty-word branch only (still needed there for the --% PS 5.1 fix) - Add TODO comment for unimplemented shell hooks in generate_powershell - Add regression tests for new/recover flag-skip behaviour and updated completion branch assertions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
wsp completion powershelloutput: awspfunction wrapper and aRegister-ArgumentCompleterscriptblock--%stop-parsing tokenpowershell.exe) and Unix (bash)wsp completion --helpSetup
Add to your PowerShell profile (
$PROFILE):Test plan
wsp completion powershelloutputs a valid scriptwspsubcommands and workspace nameswsp <TAB>works (empty-word completion via--%fix)🤖 Generated with Claude Code