From 0b48a2c8516fa0968f3c162b5e0bb5314e249973 Mon Sep 17 00:00:00 2001 From: Tony Tkacik Date: Wed, 21 Jun 2017 15:11:46 +0200 Subject: [PATCH] taskie: Use nux-runner interactive features. Signed-off-by: Tony Tkacik --- bin/taskie | 45 ++++++++++++--------------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/bin/taskie b/bin/taskie index a4233ac..d588f70 100755 --- a/bin/taskie +++ b/bin/taskie @@ -23,6 +23,15 @@ endwith.backend() { } +task.labels() { + : +} + +## +## add:: [labels] title +## Adds issue to the task repository. If issue of same title is +## already known locally this fails. +## task.add() { with.backend $(backend.detect); if ! backend.$backend.issue.exists "$@" ; then @@ -33,40 +42,10 @@ task.add() { endwith.backend; } -task.interactive() { - with.backend $(backend.detect); - .process() { - backendFunc=backend.$backend.$command; - if nux.check.function $backendFunc; then - - eval backend.$backend.$command "$arguments" - else - echo "$command" is not defined. - fi - } - .complete() { - nux.log debug "Requested completion for " "$@" - echo """ - add - done - close - finish - exit - list - report - help - """ | grep -G "^ *$@" - #statements - #statements - #statementsi - } - .prompt() { - echo "${nc_green}taskie${nc_end}> " - } - nux.repl.start .process .prompt .complete - endwith.backend; -} +## +## +## task.list() { with.backend $(backend.detect); backend.$backend.list "$@";