some improvements

This commit is contained in:
Dmitriy Pleshevskiy 2022-08-05 13:44:52 +03:00
parent e16011950d
commit b79f84ed1e
Signed by: pleshevskiy
GPG Key ID: 1B59187B161C0215
1 changed files with 13 additions and 15 deletions

View File

@ -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<usize>,
},
Pause,
Finish,
Status,
Add {
#[clap(short, long)]
link: Option<String>,
@ -44,9 +32,19 @@ pub enum SubCommand {
#[clap(subcommand)]
priority: Priority,
},
List,
Start {
#[clap(short, long)]
open: bool,
idx: Option<usize>,
},
Pause,
Finish,
Status,
}
#[derive(Parser)]
#[derive(clap::Subcommand)]
pub enum Priority {
Before { idx: usize },
After { idx: usize },