diff options
author | Minijackson <minijackson@riseup.net> | 2019-09-08 16:15:46 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2019-11-10 16:37:59 +0100 |
commit | 3301430c676e4af6b95d96b6408a66f9d2768653 (patch) | |
tree | 12810ce81a3b1d3cb23270fc5119016d5f6c325a /src/cli.rs | |
download | poseidoc-3301430c676e4af6b95d96b6408a66f9d2768653.tar.gz poseidoc-3301430c676e4af6b95d96b6408a66f9d2768653.zip |
First version
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs new file mode 100644 index 0000000..e106de7 --- /dev/null +++ b/src/cli.rs | |||
@@ -0,0 +1,18 @@ | |||
1 | use structopt::StructOpt; | ||
2 | |||
3 | #[derive(Debug, Clone, StructOpt)] | ||
4 | pub(crate) struct Cli { | ||
5 | #[structopt(long, short, parse(from_occurrences))] | ||
6 | pub(crate) verbosity: u8, | ||
7 | |||
8 | #[structopt(long, number_of_values = 1, parse(try_from_str = shell_words::split))] | ||
9 | pub(crate) extra_arg: Vec<Vec<String>>, | ||
10 | |||
11 | #[structopt(subcommand)] | ||
12 | pub(crate) command: Command, | ||
13 | } | ||
14 | |||
15 | #[derive(Debug, Clone, StructOpt)] | ||
16 | pub(crate) enum Command { | ||
17 | Generate { file: String }, | ||
18 | } | ||