clap-rs / clap

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

feat(clap_complete): Add `ParseState` to support more dynamic completion #5538

Closed shannmu closed 3 days ago

shannmu commented 1 week ago

Related issue: https://github.com/clap-rs/clap/issues/3920

Add ParseState to record the context during completion parsing. So when we do dynamic completion, we can use this context to specify what we need to complete and support more dynamic completion including --flag value

epage commented 1 week ago

feat(clap_complete): Add ParseState to support more dynamic completion

The PR / commit title say this is a feature but this looks like its a refactor (code clean up with no user-visible change). Could you clarify what the end-user impact of this either in the type or in the description?