clap-rs / clap

A full featured, fast Command Line Argument Parser for Rust
docs.rs/clap
Apache License 2.0
14.05k stars 1.03k forks source link

Ability to forward completions in Rust native completions #5653

Open epage opened 1 month ago

epage commented 1 month ago

and likely other cases require completing other commands.

See https://carapace-sh.github.io/carapace-bin/spec/embed.html

shannmu commented 2 weeks ago

This feature is undoubtedly a powerful capability. Let me try to explain my understanding of this feature.

For external subcommand completions, we can categorize them into cases that require forward completions and those that do not.

epage commented 2 weeks ago

For cases that do not require forward completions, such as cargo , this is simple to implement.

I view this as separate from this issue though it would be good to have a way to solve it.

For external commands implemented by clap:

imo users and other applications should not be aware an application is using clap.

For external commands not implemented by clap:

This is likely what we'll need to do.

I put this as one of the lowest priority items. I do not believe it is needed for parity with existing clap_complete or for cargo.