summaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
authorThayne McCombs <astrothayne@gmail.com>2022-06-17 02:08:24 -0600
committerThayne McCombs <astrothayne@gmail.com>2022-10-08 00:41:33 -0600
commit4e7b403c1fea376f1b5be8cb25e10688a4b120f5 (patch)
tree78858c7e946a359997e80d10469320d7df4ae682 /build.rs
parent45d6f55d3aecdeb01ee2317423ae9459c771bca7 (diff)
Use clap-derive for option parsing
This makes the definition of arguments to fd a little more ergonomic, and makes it easier to insure the types for the arguments are consitent.
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/build.rs b/build.rs
index d78641a..fc54326 100644
--- a/build.rs
+++ b/build.rs
@@ -1,11 +1,3 @@
-use std::fs;
-
-use clap_complete::{generate_to, Shell};
-use Shell::*;
-//use clap_complete::shells::Shel{Bash, Fish, PowerShell, Elvish};
-
-include!("src/app.rs");
-
fn main() {
let min_version = "1.56";
@@ -17,17 +9,4 @@ fn main() {
std::process::exit(1);
}
}
-
- let var = std::env::var_os("SHELL_COMPLETIONS_DIR").or_else(|| std::env::var_os("OUT_DIR"));
- let outdir = match var {
- None => return,
- Some(outdir) => outdir,
- };
- fs::create_dir_all(&outdir).unwrap();
-
- let mut app = build_app();
- // NOTE: zsh completions are hand written in contrib/completion/_fd
- for shell in [Bash, PowerShell, Fish, Elvish] {
- generate_to(shell, &mut app, "fd", &outdir).unwrap();
- }
}