From d75fbb0a21b80b9e3dd86d0199ef8db477a1138a Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 6 Dec 2019 09:53:14 +0100 Subject: [PATCH] src/bin/dump-catalog-shell-cli.rs: generate catalog shell docs --- src/bin/dump-catalog-shell-cli.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/bin/dump-catalog-shell-cli.rs diff --git a/src/bin/dump-catalog-shell-cli.rs b/src/bin/dump-catalog-shell-cli.rs new file mode 100644 index 00000000..4a2553e1 --- /dev/null +++ b/src/bin/dump-catalog-shell-cli.rs @@ -0,0 +1,20 @@ +use failure::*; + +use proxmox::api::format::*; +use proxmox::api::cli::*; + +use proxmox_backup::backup::catalog_shell_cli; + +fn main() -> Result<(), Error> { + + match catalog_shell_cli() { + CommandLineInterface::Nested(map) => { + let usage = generate_nested_usage("", &map, DocumentationFormat::ReST); + println!("{}", usage); + + } + _ => unreachable!(), + } + + Ok(()) +}