1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-01-13 21:28:13 +02:00
ripgrep/build.rs

28 lines
592 B
Rust
Raw Normal View History

#[macro_use]
extern crate clap;
#[macro_use]
extern crate lazy_static;
2016-12-07 10:32:24 -05:00
use std::env;
use std::fs;
use clap::Shell;
#[allow(dead_code)]
#[path = "src/app.rs"]
mod app;
fn main() {
2016-12-07 10:32:24 -05:00
let outdir = match env::var_os("OUT_DIR") {
None => return,
Some(outdir) => outdir,
};
fs::create_dir_all(&outdir).unwrap();
let mut app = app::app_short();
2016-12-07 10:32:24 -05:00
app.gen_completions("rg", Shell::Bash, &outdir);
app.gen_completions("rg", Shell::Fish, &outdir);
app.gen_completions("rg", Shell::Zsh, &outdir);
app.gen_completions("rg", Shell::PowerShell, &outdir);
}