pwgenr/build.rs
2017-01-26 12:58:31 +01:00

26 lines
755 B
Rust

#[macro_use] extern crate lazy_static;
extern crate clap;
use clap::Shell;
use std::env;
include!("src/cli.rs");
fn main() {
let outdir = match env::var_os("OUT_DIR") {
None => return,
Some(outdir) => outdir,
};
let mut app = build_cli();
app.gen_completions("pwgenr", // We need to specify the bin name manually
Shell::Bash, // Then say which shell to build completions for
outdir.clone()); // Then say where write the completions to
app.gen_completions("pwgenr",
Shell::Zsh,
outdir.clone());
app.gen_completions("pwgenr",
Shell::Fish,
outdir.clone());
}