api: Add clap_generate::Shell enum

This commit is contained in:
Logan SQUIREL 2021-03-11 07:51:32 +01:00
parent 5618ec39e5
commit 6a4cc8f9dd
No known key found for this signature in database
GPG key ID: E8BDBE1DA96E9B2B

View file

@ -37,6 +37,21 @@ use std::path::PathBuf;
#[doc(inline)] #[doc(inline)]
pub use generators::Generator; pub use generators::Generator;
/// Shell with auto-generated completion script available.
#[non_exhaustive]
pub enum Shell {
/// Bash shell
Bash,
/// Elvish shell
Elvish,
/// Fish shell
Fish,
/// PowerShell
PowerShell,
/// Zsh shell
Zsh,
}
/// Generate a file for a specified generator at compile time. /// Generate a file for a specified generator at compile time.
/// ///
/// **NOTE:** to generate the file at compile time you must use a `build.rs` "Build Script" /// **NOTE:** to generate the file at compile time you must use a `build.rs` "Build Script"