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

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 },