diff options
| author | Nikolaus Gotsche <n@softwarefools.com> | 2018-10-14 23:40:18 +0200 |
|---|---|---|
| committer | Nikolaus Gotsche <n@softwarefools.com> | 2018-10-14 23:40:18 +0200 |
| commit | ae396b0399a9ee4ec8aee4879f0eb36bc7aeb7e8 (patch) | |
| tree | 97ef6e5616ce8b25ff82603853e8e1ad1237d236 /interact.go | |
| parent | 35f3d2dbaa37778e78dde4416d90d1f779e00b8c (diff) | |
Pause Resume and more bugfixing0.3.1
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("______________________")) }, |
