pwgenr/build.rs

26 lines
755 B
Rust
Raw Normal View History

2017-01-26 11:58:31 +00:00
#[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());
}