-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Stablize Rust-Native Completion Engine Tracking Issue #3166
Copy link
Copy link
Open
Labels
A-completionArea: completion generatorArea: completion generatorC-enhancementCategory: Raise on the bar on expectationsCategory: Raise on the bar on expectationsC-tracking-issueCategory: A tracking issue for an unstable featureCategory: A tracking issue for an unstable featureE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Experience needed to fix: Medium / intermediateCall for participation: Experience needed to fix: Medium / intermediate
Metadata
Metadata
Assignees
Labels
A-completionArea: completion generatorArea: completion generatorC-enhancementCategory: Raise on the bar on expectationsCategory: Raise on the bar on expectationsC-tracking-issueCategory: A tracking issue for an unstable featureCategory: A tracking issue for an unstable featureE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Experience needed to fix: Medium / intermediateCall for participation: Experience needed to fix: Medium / intermediate
Maintainer's notes:
Remaining work for feature parity
ValueHints (feat(complete): Skeleton for Rust-driven completions #3656)OsStringto preserve non-UTF8 pathsstdoutshould not be used before getting to completion processing in case the completions are requested (docs(complete): Expand dynamic docs #5643)clap_complete::env::Elvishgenerates code deprecated in 0.18, removed in 0.21 #5729Non-blocking work
is_require_equal_setsupport (Supportis_require_equal_setin native completions #3923)lastsupporttrailing_var_argsupportValueHintsDesign considerations
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.