kanidm/kanidm_tools/src/cli/main.rs
Firstyear 6c79914395
306 command complete (#354)
Fixes #306 adding command line autocompletion. These are generated to: CARGO_TARGET_DIR/item-hash/out/. These will need to be packaged for distros later, it's unclear how we could use cargo install with these as cargo doesn't support arbitrary artefacts like this (yet?).
2021-02-13 13:46:22 +10:00

29 lines
703 B
Rust

#![deny(warnings)]
#![warn(unused_extern_crates)]
#![deny(clippy::unwrap_used)]
#![deny(clippy::expect_used)]
#![deny(clippy::panic)]
#![deny(clippy::unreachable)]
#![deny(clippy::await_holding_lock)]
#![deny(clippy::needless_pass_by_value)]
#![deny(clippy::trivially_copy_pass_by_ref)]
use kanidm_cli::KanidmClientOpt;
use structopt::StructOpt;
fn main() {
let opt = KanidmClientOpt::from_args();
if opt.debug() {
::std::env::set_var(
"RUST_LOG",
"kanidm=debug,kanidm_client=debug,webauthn=debug",
);
} else {
::std::env::set_var("RUST_LOG", "kanidm=info,kanidm_client=info,webauthn=info");
}
env_logger::init();
opt.exec()
}