Skip to content

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.

1 participant