From 34639c4285621177efb10b82ddb07cd0017af56a Mon Sep 17 00:00:00 2001 From: Quey-Liang Kao Date: Sun, 20 Aug 2017 22:45:31 +0800 Subject: 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. --- todolist/app.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'todolist/app.go') 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) { -- cgit v1.3