From 4ca4cd82b587f6600fc837025a8598e459e6bec0 Mon Sep 17 00:00:00 2001 From: Howard Date: Fri, 8 May 2026 11:16:53 +0800 Subject: [PATCH 1/2] docs(cli): add Windows PowerShell completion example The shell completion documentation only showed Unix/bash examples, making it unusable for Windows users. Added platform-specific examples for both Unix/macOS (bash) and Windows (PowerShell). Changes: - Add Unix/macOS (bash) example with ~/.bash_completion.d path - Add Windows (PowerShell) example with C:\Users\y00031947\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 path - Improve clarity with platform labels Fixes: Windows users cannot use shell completion manual installation --- docs/cli.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/cli.md b/docs/cli.md index 81753560a..a76d80808 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -1039,8 +1039,13 @@ openspec completion install openspec completion install zsh # Generate script for manual installation + +# Unix/macOS (bash) openspec completion generate bash > ~/.bash_completion.d/openspec +# Windows (PowerShell) +openspec completion generate powershell > $PROFILE + # Uninstall openspec completion uninstall ``` From 85020979622e5b88f7ea2469f4b41529199101b8 Mon Sep 17 00:00:00 2001 From: Howard Date: Fri, 8 May 2026 15:35:34 +0800 Subject: [PATCH 2/2] fix(cli): use append operator for PowerShell profile to avoid data loss Critical fix: Using '>' operator would overwrite the user's PowerShell profile, deleting existing configurations. Changed to '>>' to append instead of overwrite, preserving user's existing settings. --- docs/cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cli.md b/docs/cli.md index a76d80808..076ecaffc 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -1044,7 +1044,7 @@ openspec completion install zsh openspec completion generate bash > ~/.bash_completion.d/openspec # Windows (PowerShell) -openspec completion generate powershell > $PROFILE +openspec completion generate powershell >> $PROFILE # Uninstall openspec completion uninstall