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/parser.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/parser.go')
| -rw-r--r-- | todolist/parser.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/todolist/parser.go b/todolist/parser.go index 42af133..8f5e180 100644 --- a/todolist/parser.go +++ b/todolist/parser.go @@ -91,11 +91,11 @@ func (p *Parser) ParseNotes(todo *Todo, input string) string { todo.Notes = append(todo.Notes, matches[2]) return "add" - case "ln": + case "n": groups := map[string][]*Todo{} groups[""] = append(groups[""], todo) formatter := NewFormatter(&GroupedTodos{Groups: groups}) - formatter.PrintNotes() + formatter.Print(true) return "list" case "dn": |
