some improvements
This commit is contained in:
parent
e16011950d
commit
b79f84ed1e
1 changed files with 13 additions and 15 deletions
28
src/cli.rs
28
src/cli.rs
|
@ -1,24 +1,12 @@
|
||||||
use clap::Parser;
|
#[derive(clap::Parser)]
|
||||||
|
|
||||||
#[derive(Parser)]
|
|
||||||
#[clap(author, version, about = "Experemental task manager")]
|
#[clap(author, version, about = "Experemental task manager")]
|
||||||
pub struct Args {
|
pub struct Args {
|
||||||
#[clap(subcommand)]
|
#[clap(subcommand)]
|
||||||
pub command: SubCommand,
|
pub command: SubCommand,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(clap::Subcommand)]
|
||||||
pub enum SubCommand {
|
pub enum SubCommand {
|
||||||
List,
|
|
||||||
Start {
|
|
||||||
#[clap(short, long)]
|
|
||||||
open: bool,
|
|
||||||
|
|
||||||
idx: Option<usize>,
|
|
||||||
},
|
|
||||||
Pause,
|
|
||||||
Finish,
|
|
||||||
Status,
|
|
||||||
Add {
|
Add {
|
||||||
#[clap(short, long)]
|
#[clap(short, long)]
|
||||||
link: Option<String>,
|
link: Option<String>,
|
||||||
|
@ -44,9 +32,19 @@ pub enum SubCommand {
|
||||||
#[clap(subcommand)]
|
#[clap(subcommand)]
|
||||||
priority: Priority,
|
priority: Priority,
|
||||||
},
|
},
|
||||||
|
List,
|
||||||
|
Start {
|
||||||
|
#[clap(short, long)]
|
||||||
|
open: bool,
|
||||||
|
|
||||||
|
idx: Option<usize>,
|
||||||
|
},
|
||||||
|
Pause,
|
||||||
|
Finish,
|
||||||
|
Status,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(clap::Subcommand)]
|
||||||
pub enum Priority {
|
pub enum Priority {
|
||||||
Before { idx: usize },
|
Before { idx: usize },
|
||||||
After { idx: usize },
|
After { idx: usize },
|
||||||
|
|
Loading…
Reference in a new issue