Skip to content

Fix subcommand help usage - #2621

Merged
Widthdom merged 5 commits into
mainfrom
fix-issue1693
May 24, 2026
Merged

Fix subcommand help usage#2621
Widthdom merged 5 commits into
mainfrom
fix-issue1693

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Print command-specific usage for cdidx <command> --help instead of the full top-level help.
  • Add completions as a command alias for shell completion generation while preserving the legacy --completions behavior.
  • Cover command-specific help and alias-specific completion errors in CLI regression tests.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~ProgramCliTests.SubcommandHelp_PrintsCommandSpecificUsage|FullyQualifiedName~ProgramCliTests.CompletionsCommand_ErrorsUseCommandUsage|FullyQualifiedName~ProgramCliTests.Completions_HelpLikeValueReturnsCompletionsError|FullyQualifiedName~CliFlagSchemaTests" -p:UseSharedCompilation=false
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • Smoke checks: cdidx search --help, cdidx index --help, cdidx license --help, cdidx completions --help, cdidx completions --json

Documentation and Changelog

  • Added changelog fragment changelog.d/unreleased/1693.fixed.md.
  • No docs changes were required because this only changes CLI help output discoverability.

Review

Fixes #1693

@Widthdom
Widthdom merged commit da3be10 into main May 24, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue1693 branch May 24, 2026 11:13
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.

Per-subcommand --help does not print contextual usage for any subcommand

1 participant