clap_autocomplete

Crates.ioclap_autocomplete
lib.rsclap_autocomplete
version0.4.2
sourcesrc
created_at2022-03-13 11:18:05.423459
updated_at2024-10-21 18:06:08.833557
descriptionEasy to integrate shell completion for Clap. Finds the user's shell and puts completion files in the appropriate locations.
homepagehttps://github.com/Icelk/clap_autocomplete
repositoryhttps://github.com/Icelk/clap_autocomplete
max_upload_size
id549164
size23,405
Icelk (Icelk)

documentation

README

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

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.

Commit count: 22

cargo fmt