Print help-text when no command given
This commit is contained in:
parent
68e25e0566
commit
1826a839e7
1 changed files with 19 additions and 19 deletions
|
|
@ -13,7 +13,7 @@ struct Cli {
|
|||
#[structopt(short, long)]
|
||||
debug: bool,
|
||||
#[structopt(subcommand)]
|
||||
cmd: Option<Command>,
|
||||
cmd: Command,
|
||||
}
|
||||
|
||||
#[derive(StructOpt)]
|
||||
|
|
@ -48,7 +48,7 @@ fn main() -> Result<()> {
|
|||
};
|
||||
let args = Cli::from_args();
|
||||
match args.cmd {
|
||||
Some(subcommand) => match subcommand {
|
||||
// Some(subcommand) => match subcommand {
|
||||
Command::ListCourses(options) => {
|
||||
for c in Course::list(&conf, &options)?.iter() {
|
||||
println!("{}", c);
|
||||
|
|
@ -66,8 +66,8 @@ fn main() -> Result<()> {
|
|||
Command::Init => (),
|
||||
Command::Check(list_options) => Course::check(&conf, &list_options)?,
|
||||
Command::Meetings(options) => rofi::select_meeting(&conf, &options)?,
|
||||
},
|
||||
None => println!("No command given"),
|
||||
//},
|
||||
// None => println!("No command given"),
|
||||
};
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue