diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/example-completion/src/main.rs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/examples/example-completion/src/main.rs b/examples/example-completion/src/main.rs index 413afd3..3f1a377 100644 --- a/examples/example-completion/src/main.rs +++ b/examples/example-completion/src/main.rs @@ -3,13 +3,23 @@ //! # How to Deploy //! 1. Enable the `comp` feature //! ```toml +//! [dependencies] //! mingling = { version = "...", features = [ //! "comp", // Enable this feature //! "parser" //! ] } //! ``` //! -//! 2. Write `build.rs` to generate completion scripts at compile time +//! 2. Add `mingling` as a build dependency, enabling the `builds` and `comp` features +//! ```toml +//! [build-dependencies] +//! mingling = { version = "...", features = [ +//! "builds", // Enable this feature for build scripts +//! "comp" +//! ] } +//! ``` +//! +//! 3. Write `build.rs` to generate completion scripts at compile time //! ```ignore //! use mingling::build::{build_comp_scripts, build_comp_scripts_with_bin_name}; //! fn main() { @@ -21,8 +31,8 @@ //! } //! ``` //! -//! 3. Write `main.rs`, adding completion logic for your command entry point -//! 4. Execute `cargo install --path ./`, then run the corresponding completion script in your shell +//! 4. Write `main.rs`, adding completion logic for your command entry point +//! 5. Execute `cargo install --path ./`, then run the corresponding completion script in your shell use mingling::{ EnumTag, Groupped, ShellContext, Suggest, |
