From 0a2ef958c0dca21d19e4ffc38ba5a7c4078e182a Mon Sep 17 00:00:00 2001 From: Weicao-CatilGrass <1992414357@qq.com> Date: Sat, 23 May 2026 23:41:04 +0800 Subject: Rework examples and add entry macro for testing --- examples/example-completion/build.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 examples/example-completion/build.rs (limited to 'examples/example-completion/build.rs') diff --git a/examples/example-completion/build.rs b/examples/example-completion/build.rs new file mode 100644 index 0000000..e1ffba1 --- /dev/null +++ b/examples/example-completion/build.rs @@ -0,0 +1,14 @@ +fn main() { + build_scripts(); +} + +/// Generate completion scripts +fn build_scripts() { + // `env!("CARGO_PKG_NAME")` equals the crate name, which matches the binary name. + // If your binary name differs from the crate name, specify it explicitly. + mingling::build::build_comp_scripts( + // Your binary name: + env!("CARGO_PKG_NAME"), + ) + .unwrap(); +} -- cgit