Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 10, 2026

Summary

  • Fixed Bash and PowerShell completion generators to offer parent-level flags when commands have both flags and subcommands
  • When the user types input starting with -, parent flags are now suggested instead of only showing subcommands
  • Added tests for the new behavior in both generators

Before: openspec config --<TAB> → Only showed subcommands (set, get, list)
After: openspec config --<TAB> → Shows parent flags (--scope, -s, --json) when input starts with -

Fixes #463

Test plan

  • New tests verify parent flags are offered when command has both flags and subcommands
  • All 881 existing tests pass
  • Build succeeds with no type errors

🤖 Generated with Claude Code

…mmands exist

When a command has both flags and subcommands, the Bash and PowerShell
completion generators now check if the user is typing a flag (input
starts with `-`) before offering subcommand completions. This fixes the
issue where parent-level flags were never suggested.

Before: `openspec config --<TAB>` → Only showed subcommands
After: `openspec config --<TAB>` → Shows parent flags when input starts with `-`

Fixes #463
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 10, 2026

Warning

Rate limit exceeded

@TabishB has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 10 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 504c93b and 2fa07b9.

📒 Files selected for processing (4)
  • src/core/completions/generators/bash-generator.ts
  • src/core/completions/generators/powershell-generator.ts
  • test/core/completions/generators/bash-generator.test.ts
  • test/core/completions/generators/powershell-generator.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

@TabishB TabishB merged commit ae85a72 into main Jan 10, 2026
7 checks passed
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.

Bug: Bash/PowerShell completions don't show parent flags for commands with subcommands

2 participants