aboutsummaryrefslogtreecommitdiff
path: root/examples/example-completion/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example-completion/build.rs')
-rw-r--r--examples/example-completion/build.rs14
1 files changed, 14 insertions, 0 deletions
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();
+}