Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(complete): Skeleton for Rust-driven completions #3656

Merged
merged 23 commits into from
Apr 27, 2022

Conversation

epage
Copy link
Member

@epage epage commented Apr 22, 2022

This implements the rudiments of completions within Rust.

What this can do for Bash

  • Nest into subcommands
  • Provide single-value positional value completions
    • PossibleValues
    • Some of ValueHint
  • Provide short and long flag completions
  • Provide subcommand completions

What this does not do

  • Flag values
  • Multiple values per argument
  • Removing options based on conflicts
  • Handle all of the random App and Arg settings
  • Correctly append spaces when needed
  • Shells other than Bash

Part of #3166

epage added 23 commits April 27, 2022 08:55
Finding this a pain in `clap_complete`; not offering the benefits I
expected.
Inspired by argcomplete, this provides Rust-implemented completions
- Only bash for now
- No subcommand support
- No flag value support
- No special settings support
- No handling of positions within positionals
- No prioritizing of required or removing of conflicts (including
  self-conflicts)
This makes testing easier
@epage epage marked this pull request as ready for review April 27, 2022 21:08
@epage epage merged commit 9bf01e9 into clap-rs:master Apr 27, 2022
@epage epage deleted the complete branch April 27, 2022 21:24
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.

None yet

1 participant