This repository has been archived by the owner on Nov 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6371ba0
commit 54f1bda
Showing
5 changed files
with
104 additions
and
713 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
use structopt::clap::Shell; | ||
use clap::CommandFactory; | ||
use clap_complete::{generate_to, Shell}; | ||
|
||
include!("src/cli.rs"); | ||
|
||
fn main() { | ||
let outdir = std::env::var("OUT_DIR").unwrap(); | ||
let mut app = BaseCommand::clap(); | ||
app.gen_completions("bodhi-cli", Shell::Bash, outdir); | ||
let out_dir = std::env::var("OUT_DIR").unwrap(); | ||
let bin_name = std::env::var("CARGO_PKG_NAME").unwrap(); | ||
let mut command = BaseCommand::command(); | ||
|
||
generate_to(Shell::Bash, &mut command, &bin_name, &out_dir).unwrap(); | ||
generate_to(Shell::Fish, &mut command, &bin_name, &out_dir).unwrap(); | ||
generate_to(Shell::Zsh, &mut command, &bin_name, &out_dir).unwrap(); | ||
} |
Oops, something went wrong.