summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-02-04 11:06:58 +0200
committerLars Wirzenius <liw@liw.fi>2021-02-04 11:07:31 +0200
commit22202d176259d962abdbfdefef1e6213408df06c (patch)
treee36be72149099d6df45380a81c43c3c39d84fe80 /src/cmd
parentcda0e5bde3fa0c9c2cb0b4fa9f21fbb758acfbe1 (diff)
downloadobnam2-22202d176259d962abdbfdefef1e6213408df06c.tar.gz
feat: add obnam config subcommand
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/mod.rs3
-rw-r--r--src/cmd/show_config.rs7
2 files changed, 10 insertions, 0 deletions
diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs
index 8f08668..fc517be 100644
--- a/src/cmd/mod.rs
+++ b/src/cmd/mod.rs
@@ -15,3 +15,6 @@ pub use get_chunk::get_chunk;
pub mod show_gen;
pub use show_gen::show_generation;
+
+pub mod show_config;
+pub use show_config::show_config;
diff --git a/src/cmd/show_config.rs b/src/cmd/show_config.rs
new file mode 100644
index 0000000..b4f4cdc
--- /dev/null
+++ b/src/cmd/show_config.rs
@@ -0,0 +1,7 @@
+use crate::client::ClientConfig;
+use crate::error::ObnamError;
+
+pub fn show_config(config: &ClientConfig) -> Result<(), ObnamError> {
+ println!("{}", serde_json::to_string_pretty(config)?);
+ Ok(())
+}