Skip to content

Keep dynamic completion kinds in contiguous groups - #6533

Closed
ArjunCodess wants to merge 1 commit into
clap-rs:mainfrom
ArjunCodess:fix/dynamic-completion-sort
Closed

ArjunCodess wants to merge 1 commit into
clap-rs:mainfrom
ArjunCodess:fix/dynamic-completion-sort

Conversation

@ArjunCodess

Copy link
Copy Markdown

Summary

  • Dynamic completion sorts commands, then values, then options, and uses display order only inside each group.
  • A flag can no longer sit between subcommand names. sort_and_filter covers that case.

Fixes #6371

This pull request was prepared with Cursor Grok 4.7.

Rank candidates as commands, then values, then options before
display_order so the shared arg/subcommand counter cannot interleave
flags with subcommand names.
@epage

epage commented Sep 22, 2026

Copy link
Copy Markdown
Member

This is in violation of our AI policy, see https://github.com/clap-rs/clap/blob/main/AI_POLICY.md

@epage epage closed this Sep 22, 2026
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.

Dynamic completion sort order is not correct

2 participants