Repository navigation
feat(completion): add PowerShell completion support #643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
2c63e10
4c5eb4c
8de9efa
ffd6e44
233ce19
ee34d75
730f282
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -165,7 +165,7 @@ export class ShutdownController { | |
| } | ||
|
|
||
| class BrokenPipeInterruptError extends InterruptError { | ||
| override readonly exitCode = 0; | ||
| override readonly exitCode = (process.exitCode as number | undefined) ?? 0; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Update the broken-pipe exit-code comments. When Also applies to: 369-369 🤖 Prompt for AI Agents |
||
|
|
||
| constructor() { | ||
| // Existing graceful-detach consumers read `.signal` to render their | ||
|
|
@@ -366,7 +366,7 @@ export function installBrokenPipeGuard(deps: BrokenPipeDeps = {}): void { | |
| shutdown.brokenPipe(); | ||
| return; | ||
| } | ||
| exit(0); | ||
| exit((process.exitCode as number | undefined) ?? 0); | ||
| return; | ||
| } | ||
| throw error; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: TestSprite/testsprite-cli
Length of output: 14118
Recognize
pwshduring shell detection.When
$SHELLends inpwsh, normalize it topowershellbefore validation. The current code rejectspwsh, so completion without an explicit shell can raise a validation error instead of generating the PowerShell script. Add coverage for this detection path.Suggested fix
it('detects the shell from a $SHELL path', () => { expect(detectShell({ SHELL: '/bin/bash' })).toBe('bash'); expect(detectShell({ SHELL: '/usr/bin/zsh' })).toBe('zsh'); expect(detectShell({ SHELL: '/usr/local/bin/fish' })).toBe('fish'); + expect(detectShell({ SHELL: '/usr/bin/pwsh' })).toBe('powershell'); });🤖 Prompt for AI Agents