#cli #bash #clap #completion #fish

clap_autocomplete

Easy to integrate shell completion for Clap. Finds the user’s shell and puts completion files in the appropriate locations.

4 releases

Uses new Rust 2021

0.2.1 Apr 20, 2022
0.2.0 Apr 19, 2022
0.1.1 Mar 13, 2022
0.1.0 Mar 13, 2022

#210 in Command-line interface

Download history 22/week @ 2022-06-07 9/week @ 2022-06-14 21/week @ 2022-06-21 11/week @ 2022-06-28 10/week @ 2022-07-05 18/week @ 2022-07-12 13/week @ 2022-07-19 19/week @ 2022-07-26 27/week @ 2022-08-02 26/week @ 2022-08-09 8/week @ 2022-08-16 16/week @ 2022-08-23 36/week @ 2022-08-30 33/week @ 2022-09-06 18/week @ 2022-09-13 12/week @ 2022-09-20

100 downloads per month
Used in 2 crates

MIT/Apache

9KB
93 lines

Easy to integrate shell completion for Clap. Finds the user's shell and puts completion files in the appropriate locations.

A library which adds a subcommand to your command. It also checks the matches and returns whether or not the operation succeeded.

Supported shells

This supports the same shells as clap_complete.

It however only supports placing the completion files for Fish, Bash, and Zsh. If the user is using any other shell, they will have to pipe the output into a file.

Documentation

Documentation for releases can be found on docs.rs. Main branch documentation is found on doc.icelk.dev.

Versions

  • 0.1.x: Clap >= 3.1, < 4
  • 0.2.x: Clap >= 3.1, < 4

Changelog

0.2.1

  • Faster fetching of shell
  • 4 nested dependencies removed

0.2.0

  • Much faster fetching of shell.
  • 20 less dependencies (removed rayon, which was included as part of sysinfo in the old shell fetch crate).
  • Better output of OS errors.
  • Status messages print to stderr.
  • Removed dependency on clap's default features (e.g. regex).

License

Dual-licensed under Apache 2.0 or MIT.

Dependencies

~2.4–3.5MB
~64K SLoC