Browse Source

Add "resume" alias

master
Andreas Linz 2 years ago
parent
commit
49135dc392
No known key found for this signature in database GPG Key ID: 8DEF5099A0822620
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/main.rs

+ 3
- 3
src/main.rs View File

@ -156,10 +156,10 @@ fn recs_at_date(conn: &rusqlite::Connection, date: NaiveDate) -> Result
fn usage(program: &str) -> String {
format!(
"{} <cmd>
usage | help: shows this message
begin | stop: begin or stop work
pause: starts/stops a pause
pause | resume: starts/stops a pause
show [yyyy-mm-dd]: prints work time for given date of today's when absent",
program
)
@ -188,7 +188,7 @@ fn main() -> Result<(), TTError> {
"help" | "usage" => print_usage(&program),
"show" => show(&conn, args.pop_front())?,
"begin" | "stop" => record(&conn, State::Work)?,
"pause" => record(&conn, State::Pause)?,
"pause" | "resume" => record(&conn, State::Pause)?,
_ => {
print_usage(&program);
return Err(TTError::UnknownCommand);

Loading…
Cancel
Save