From: Ian Jackson Date: Wed, 2 Jun 2021 00:12:38 +0000 (+0100) Subject: otter cli: Make ordinary_subcommand handle SubcommandProperties X-Git-Tag: otter-0.7.0~118 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9a72e98322894eb2e9bf889c65bd8fa07d662145;p=otter.git otter cli: Make ordinary_subcommand handle SubcommandProperties Signed-off-by: Ian Jackson --- diff --git a/src/bin/otter.rs b/src/bin/otter.rs index d791060d..e106610a 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -779,7 +779,15 @@ macro_rules! ordinary_subcmd { call, props: default(), }} - } + }; + {$verb:expr, $help:expr, $($prop:tt)+} => { + inventory::submit!{Subcommand { + verb: $verb, + help: $help, + call, + props: SubcommandProperties { $($prop)* ..default() }, + }} + }; } //---------- list-games ----------