#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.

7 unstable releases (3 breaking)

0.4.1 Feb 10, 2023
0.4.0 Oct 17, 2022
0.3.0 Oct 5, 2022
0.2.1 Apr 20, 2022
0.1.1 Mar 13, 2022

#202 in Command-line interface

Download history 20/week @ 2022-11-28 19/week @ 2022-12-05 148/week @ 2022-12-12 69/week @ 2022-12-19 39/week @ 2022-12-26 34/week @ 2023-01-02 85/week @ 2023-01-09 56/week @ 2023-01-16 113/week @ 2023-01-23 66/week @ 2023-01-30 96/week @ 2023-02-06 88/week @ 2023-02-13 35/week @ 2023-02-20 88/week @ 2023-02-27 134/week @ 2023-03-06 196/week @ 2023-03-13

484 downloads per month
Used in 2 crates

MIT/Apache

9KB
114 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
  • 0.3.x: Clap 4
  • 0.4.x: Clap 4

Changelog

0.4.1

  • Update query-shell dependency.

0.4.0

  • Fix compilation on Windows by disabling automatic writing to shell completions.

0.3.0

  • Update to Clap 4

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

~3MB
~66K SLoC