summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClementTsang <34804052+ClementTsang@users.noreply.github.com>2024-01-27 05:32:31 -0500
committerClementTsang <34804052+ClementTsang@users.noreply.github.com>2024-02-19 20:08:53 -0500
commit4a8849b5908e340285a626b06d0db68cb6c337bc (patch)
treebce0d424543815585691727352b16014408c8b1e
parent7ffc497f3f1e4c270778c23f64b093f4a5cdc14b (diff)
update build script
-rw-r--r--build.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/build.rs b/build.rs
index 5ebf6155..5a0d7663 100644
--- a/build.rs
+++ b/build.rs
@@ -7,12 +7,12 @@ use std::{
path::{Path, PathBuf},
};
-use clap::Command;
+use clap::{Command, CommandFactory};
use clap_complete::{generate_to, shells::Shell, Generator};
use clap_complete_fig::Fig;
use clap_complete_nushell::Nushell;
-use crate::args::build_app;
+use crate::args::Args;
fn create_dir(dir: &Path) -> io::Result<()> {
let res = fs::create_dir_all(dir);
@@ -48,7 +48,7 @@ fn btm_generate() -> io::Result<()> {
create_dir(&manpage_out_dir)?;
// Generate completions
- let mut app = build_app();
+ let mut app = Args::command();
generate_completions(Shell::Bash, &mut app, &completion_out_dir)?;
generate_completions(Shell::Zsh, &mut app, &completion_out_dir)?;
generate_completions(Shell::Fish, &mut app, &completion_out_dir)?;