diff options
| author | Quey-Liang Kao <s101062801@m101.nthu.edu.tw> | 2017-08-20 22:45:31 +0800 |
|---|---|---|
| committer | Quey-Liang Kao <s101062801@m101.nthu.edu.tw> | 2017-08-20 22:45:31 +0800 |
| commit | 34639c4285621177efb10b82ddb07cd0017af56a (patch) | |
| tree | 6a3828ef5f1af8a2bcf74a03eabe33f896a3dbf7 /todolist/app.go | |
| parent | ebc7b53438ef6328baf813c7cad19e43839ad0f1 (diff) | |
Redefine sub-commands: "ln" and "n"
Sub-command "ln" is redefined to the function of listing all todos
with their notes; "n" replaces original "ln", listing the notes of
a specific todo.
Diffstat (limited to 'todolist/app.go')
| -rw-r--r-- | todolist/app.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/todolist/app.go b/todolist/app.go index 66b30c8..79e3aad 100644 --- a/todolist/app.go +++ b/todolist/app.go @@ -173,7 +173,8 @@ func (a *App) ListTodos(input string) { grouped := a.getGroups(input, filtered) formatter := NewFormatter(grouped) - formatter.Print() + re, _ := regexp.Compile(`^ln`) + formatter.Print(re.MatchString(input)) } func (a *App) PrioritizeTodo(input string) { |
