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(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 },
|
||||
|
|
Loading…
Reference in a new issue