summaryrefslogtreecommitdiffstats
path: root/build.rs
blob: 2de8ee32d05027c94a56e286fb6f6463ff9e0109 (plain)
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
#[macro_use]
extern crate structopt;

use structopt::StructOpt;

use structopt::clap::Shell;

use std::env;

#[path = "src/cli.rs"]
mod cli;

fn main() {
    lalrpop::Configuration::new()
        .use_cargo_dir_conventions()
        .process()
        .unwrap();

    let outdir = env::var_os("OUT_DIR").expect("OUT_DIR environment variable not defined");

    let mut app = cli::Cli::clap();
    app.gen_completions("set_eq", Shell::Bash, &outdir);
    app.gen_completions("set_eq", Shell::Fish, &outdir);
    app.gen_completions("set_eq", Shell::Zsh, &outdir);
}