Skip to content

Stablize Rust-Native Completion Engine Tracking Issue #3166

Open
@epage

Description

@epage

Maintainer's notes:

Remaining work for feature parity

Non-blocking work

Design considerations

  • Make it easy to use for the natively supported shells but allow other shells to be supported

Prior art


#3022 was a tipping point for me in realizing that maybe our current approach to completions doesn't work. We effectively have to implement a mostly-untested parser within each shell. Examples of other problems that seem to stem from this:

If we take the approach of argcomplete where we do the parsing in our core code, rather than in each completion script, this will help us share parsing logic between shell, share some or all parsing logic with clap itself, and make a subset of the logic more testable.

We also need to decide whether to morph the existing parser into supporting this or create a custom parser (since the needs are pretty special). If we do a custom parser, we should probably do #2915 first so we can reuse lexing logic between clap and the completion generation. I've also been considering #2912 which would allow reusing the completion logic with any CLI parser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-completionArea: completion generatorC-enhancementCategory: Raise on the bar on expectationsC-tracking-issueCategory: A tracking issue for an unstable featureE-help-wantedCall for participation: Help is requested to fix this issue.E-mediumCall for participation: Experience needed to fix: Medium / intermediate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions