diff options
Diffstat (limited to 'src/cmd/show_config.rs')
-rw-r--r-- | src/cmd/show_config.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cmd/show_config.rs b/src/cmd/show_config.rs new file mode 100644 index 0000000..8e0ce30 --- /dev/null +++ b/src/cmd/show_config.rs @@ -0,0 +1,17 @@ +//! The `show-config` subcommand. + +use crate::config::ClientConfig; +use crate::error::ObnamError; +use clap::Parser; + +/// Show actual client configuration. +#[derive(Debug, Parser)] +pub struct ShowConfig {} + +impl ShowConfig { + /// Run the command. + pub fn run(&self, config: &ClientConfig) -> Result<(), ObnamError> { + println!("{}", serde_json::to_string_pretty(config)?); + Ok(()) + } +} |