-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path_build.rs
34 lines (22 loc) · 1.14 KB
/
_build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use clap_complete::{generate_to, Shell};
use cli::build_cli;
use std::io::Error;
#[path = "src/cli/build.rs"]
mod cli;
fn main() -> Result<(), Error> {
let outdir = "autocomplete_shell_scripts";
let mut cmd = build_cli();
let path = generate_to(Shell::Bash, &mut cmd, env!("CARGO_PKG_NAME"), outdir)?;
println!("cargo:error=completion file is not reliable for tenants");
println!("cargo:warning=completion file is generated: {:?}", path);
let path = generate_to(Shell::Zsh, &mut cmd, env!("CARGO_PKG_NAME"), outdir)?;
println!("cargo:error=completion file is not reliable for tenants");
println!("cargo:warning=completion file is generated: {:?}", path);
let path = generate_to(Shell::Fish, &mut cmd, env!("CARGO_PKG_NAME"), outdir)?;
println!("cargo:error=completion file is not reliable for tenants");
println!("cargo:warning=completion file is generated: {:?}", path);
let path = generate_to(Shell::Elvish, &mut cmd, env!("CARGO_PKG_NAME"), outdir)?;
println!("cargo:error=completion file is not reliable for tenants");
println!("cargo:warning=completion file is generated: {:?}", path);
Ok(())
}