-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #24
- Loading branch information
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) 2017 Guillaume Pinot <texitoi(a)texitoi.eu> | ||
// | ||
// This work is free. You can redistribute it and/or modify it under | ||
// the terms of the Do What The Fuck You Want To Public License, | ||
// Version 2, as published by Sam Hocevar. See the COPYING file for | ||
// more details. | ||
|
||
extern crate structopt; | ||
#[macro_use] | ||
extern crate structopt_derive; | ||
|
||
mod options { | ||
#[derive(Debug, StructOpt)] | ||
pub struct Options { | ||
#[structopt(subcommand)] | ||
pub subcommand: ::subcommands::SubCommand, | ||
} | ||
} | ||
|
||
mod subcommands { | ||
#[derive(Debug, StructOpt)] | ||
pub enum SubCommand { | ||
#[structopt(name = "foo", about = "foo")] | ||
Foo { | ||
#[structopt(help = "foo")] | ||
bars: Vec<String>, | ||
}, | ||
} | ||
} |