chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f748d65
)
otter cli: Make ordinary_subcommand handle SubcommandProperties
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 2 Jun 2021 00:12:38 +0000
(
01:12
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 2 Jun 2021 00:30:25 +0000
(
01:30
+0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bin/otter.rs
patch
|
blob
|
history
diff --git
a/src/bin/otter.rs
b/src/bin/otter.rs
index d791060ddad7d611f7c09930fccfd33b13ddab21..e106610a38d67b96bbc23587db0ee303c0e5a6f6 100644
(file)
--- 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 ----------