Add: New cli options related to stamps (--start, --stop and --update)

This commit is contained in:
Óscar M. Lage 2021-11-18 20:53:13 +01:00
parent fdafa8812f
commit 5ea4eead9a

View File

@ -37,6 +37,61 @@ pub fn build_cli() -> App<'static, 'static> {
.help("List last stamp only") .help("List last stamp only")
), ),
) )
.subcommand(
SubCommand::with_name("stamp")
.about("Manage stamps")
.arg(
Arg::with_name("start")
.short("s")
.long("start")
.help("Start a new stamp")
.takes_value(false),
)
.arg(
Arg::with_name("stop")
.short("S")
.long("stop")
.help("Stop last stamp")
.takes_value(false),
)
.arg(
Arg::with_name("update")
.short("u")
.long("update")
.help("Update last stamp")
.takes_value(false),
)
.arg(
Arg::with_name("task")
.short("t")
.long("task")
.value_name("TASK")
.help("Task related to the stamp")
.takes_value(true),
)
.arg(
Arg::with_name("description")
.short("d")
.long("description")
.value_name("DESCRIPTION")
.help("Task description")
.takes_value(true),
)
.arg(
Arg::with_name("dstart")
.long("dstart")
.value_name("DATE_START")
.help("Date stamp start")
.takes_value(true),
)
.arg(
Arg::with_name("dend")
.long("dend")
.value_name("DATE_END")
.help("Date stamp end")
.takes_value(true),
),
)
.subcommand( .subcommand(
SubCommand::with_name("tasks") SubCommand::with_name("tasks")
.about("List of active tasks grouped by project") .about("List of active tasks grouped by project")