Allow tasksh to process cmdline args

When invoking tasksh with command line arguments, it's useful to try and
process these via taskwarrior so that:

   tasksh pro:home list

would output the appropriate tasks before displaying the prompt.

To achieve this, refactor some of the setup calls to generate the
prompt, as well as refactoring the commandLoop.

Fixes GH issue #15
This commit is contained in:
Thomas Adam 2018-06-21 23:10:35 +01:00
parent 908d2cc38c
commit f8655302ef
3 changed files with 64 additions and 26 deletions

View file

@ -4,7 +4,7 @@
tasksh \- Interactive taskwarrior shell
.SH SYNOPSIS
.B tasksh
.B tasksh [task commands]...
.br
.B tasksh --version
@ -18,6 +18,9 @@ When built with libreadline, tasksh provides command editing and history.
Tasksh has an integrated 'review' command that leads you through an interactive
review session.
If Tasksh is invoked with command line arguments, those are passed straight
through to taskwarrior.
Tasksh supports all recent versions of Taskwarrior.
.SH COMMANDS