diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2022-03-07 22:53:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-07 22:53:02 -0500 |
commit | 01f6bddab63d5d1d61baa9e90a326ffe2696762b (patch) | |
tree | f253911faf60aaca27a6a677cf0e7de1f0b53268 /build.rs | |
parent | e682882aeeb09e721f074bc8545770208c3c5321 (diff) |
deps: update clap to 3.x (#690)
Updates bottom to use clap 3.x, along with some small refactoring changes.
Diffstat (limited to 'build.rs')
-rw-r--r-- | build.rs | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,5 +1,6 @@ -use clap::Shell; +use clap_complete::{generate_to, shells::Shell}; use std::{env, fs, process}; + include!("src/clap.rs"); fn main() { @@ -24,8 +25,9 @@ fn main() { // Generate completions let mut app = build_app(); - app.gen_completions("btm", Shell::Bash, &out_dir); - app.gen_completions("btm", Shell::Zsh, &out_dir); - app.gen_completions("btm", Shell::Fish, &out_dir); - app.gen_completions("btm", Shell::PowerShell, &out_dir); + generate_to(Shell::Bash, &mut app, "btm", &out_dir).unwrap(); + generate_to(Shell::Zsh, &mut app, "btm", &out_dir).unwrap(); + generate_to(Shell::Fish, &mut app, "btm", &out_dir).unwrap(); + generate_to(Shell::PowerShell, &mut app, "btm", &out_dir).unwrap(); + generate_to(Shell::Elvish, &mut app, "btm", &out_dir).unwrap(); } |