1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

taskie: Use nux-runner interactive features.

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2017-06-21 15:11:46 +02:00
parent 4481ca2c56
commit 0b48a2c851

View file

@ -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() { task.add() {
with.backend $(backend.detect); with.backend $(backend.detect);
if ! backend.$backend.issue.exists "$@" ; then if ! backend.$backend.issue.exists "$@" ; then
@ -33,40 +42,10 @@ task.add() {
endwith.backend; 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() { task.list() {
with.backend $(backend.detect); with.backend $(backend.detect);
backend.$backend.list "$@"; backend.$backend.list "$@";