From b79f84ed1e3147439947476739fe6d7a3c9b591e Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Fri, 5 Aug 2022 13:44:52 +0300 Subject: [PATCH] some improvements --- src/cli.rs | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 18a5962..0c1ecae 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,24 +1,12 @@ -use clap::Parser; - -#[derive(Parser)] +#[derive(clap::Parser)] #[clap(author, version, about = "Experemental task manager")] pub struct Args { #[clap(subcommand)] pub command: SubCommand, } -#[derive(Parser)] +#[derive(clap::Subcommand)] pub enum SubCommand { - List, - Start { - #[clap(short, long)] - open: bool, - - idx: Option, - }, - Pause, - Finish, - Status, Add { #[clap(short, long)] link: Option, @@ -44,9 +32,19 @@ pub enum SubCommand { #[clap(subcommand)] priority: Priority, }, + List, + Start { + #[clap(short, long)] + open: bool, + + idx: Option, + }, + Pause, + Finish, + Status, } -#[derive(Parser)] +#[derive(clap::Subcommand)] pub enum Priority { Before { idx: usize }, After { idx: usize },