km cfg -a (print all profiles)

This commit is contained in:
mbecker20
2025-08-07 20:56:49 -04:00
parent 7430798f31
commit 77ffb14f7d
2 changed files with 14 additions and 4 deletions
+11 -4
View File
@@ -19,12 +19,19 @@ async fn app() -> anyhow::Result<()> {
logger::init(&config::cli_config().cli_logging)?;
match &config::cli_args().command {
cli::Command::Config { unsanitized } => {
if *unsanitized {
println!("\n{:#?}", cli_config());
cli::Command::Config {
all_profiles,
unsanitized,
} => {
let mut config = if *unsanitized {
cli_config().clone()
} else {
println!("\n{:#?}", cli_config().sanitized());
cli_config().sanitized()
};
if !*all_profiles {
config.profiles = Default::default();
}
println!("\n{config:#?}");
Ok(())
}
cli::Command::Execute { execution, yes, .. } => {
@@ -59,6 +59,9 @@ pub enum Command {
/// Print the CLI config being used. (alias: `cfg`)
#[clap(alias = "cfg")]
Config {
/// Whether to print the additional profiles picked up
#[arg(long, short = 'a', default_value_t = false)]
all_profiles: bool,
/// Whether to print unsanitized config,
/// including sensitive credentials.
#[arg(long, action)]