-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.rs
More file actions
20 lines (16 loc) · 686 Bytes
/
build.rs
File metadata and controls
20 lines (16 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use clap::CommandFactory;
use clap_complete::{
generate_to,
shells::{Bash, Elvish, Fish, PowerShell, Zsh},
};
include!("src/terminal/cli.rs");
fn main() {
let mut command = Args::command();
command.set_bin_name("machine_setup");
let outdir = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("completions/");
generate_to(Bash, &mut command, "machine_setup", &outdir).ok();
generate_to(Zsh, &mut command, "machine_setup", &outdir).ok();
generate_to(Fish, &mut command, "machine_setup", &outdir).ok();
generate_to(PowerShell, &mut command, "machine_setup", &outdir).ok();
generate_to(Elvish, &mut command, "machine_setup", &outdir).ok();
}