aboutsummaryrefslogtreecommitdiff
path: root/mingling/src
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2026-05-11 19:56:10 +0800
committerWeicao-CatilGrass <1992414357@qq.com>2026-05-11 19:56:10 +0800
commite42567b25093907cfd939edc92ace94a5d59b398 (patch)
treef2514fdd18277b5620b0fd6512cfc95569cfce15 /mingling/src
parent99d5a62aa3655f8676021a9bf70af3d12c9457bc (diff)
Add `builds` feature and install completion scripts
Diffstat (limited to 'mingling/src')
-rw-r--r--mingling/src/example_docs.rs16
1 files changed, 13 insertions, 3 deletions
diff --git a/mingling/src/example_docs.rs b/mingling/src/example_docs.rs
index 9f1b46b..0a6c1b9 100644
--- a/mingling/src/example_docs.rs
+++ b/mingling/src/example_docs.rs
@@ -133,13 +133,23 @@ pub mod example_basic {}
/// # 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() {
@@ -151,8 +161,8 @@ pub mod example_basic {}
/// }
/// ```
///
-/// 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
///
/// Cargo.toml
/// ```ignore