diff options
Diffstat (limited to 'interact.go')
| -rw-r--r-- | interact.go | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/interact.go b/interact.go index 3c458e4..136e1d2 100644 --- a/interact.go +++ b/interact.go @@ -65,6 +65,36 @@ func interact() { }) shell.AddCmd(&ishell.Cmd{ + Name: "resume", + Help: "Resume the Paused Task", + LongHelp: ` Usage: resume + Resume the Task that was paused 'now'.`, + Func: func(c *ishell.Context) { + newTask(true) + stdOut() + setPauseTask(0) + c.Println(promptcol("______________________")) + }, + }) + + shell.AddCmd(&ishell.Cmd{ + Name: "pause", + Help: "Close the Current Task and remember it", + LongHelp: ` Usage: pause + Closes the current task 'now' and remember it to continue later. + The User is not asked to enter a comment.`, + Func: func(c *ishell.Context) { + if opentask.id>0 { + setPauseTask(opentask.id) + c.Println("Pausing Task",pausetask) + } + closeTask(false) + stdOut() + c.Println(promptcol("______________________")) + }, + }) + + shell.AddCmd(&ishell.Cmd{ Name: "status", Help: "Show Current Project and Tasks", LongHelp: ` Usage: status @@ -92,7 +122,7 @@ func interact() { LongHelp: ` Usage: startnow Start a new Task in the currently open Project with current local time`, Func: func(c *ishell.Context) { - newTask(currproject.id) + newTask(false) stdOut() c.Println(promptcol("______________________")) }, @@ -105,7 +135,7 @@ func interact() { Stop the open Task at the current local time. If no task is open the user will be notified.`, Func: func(c *ishell.Context) { - closeTask() + closeTask(true) stdOut() c.Println(promptcol("______________________")) }, |
