aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--todo.go4
-rw-r--r--todolist/parser.go2
2 files changed, 5 insertions, 1 deletions
diff --git a/todo.go b/todo.go
index 6cbc6ea..b7d453e 100644
--- a/todo.go
+++ b/todo.go
@@ -42,7 +42,7 @@ func usage() {
blueBold.Println("\nListing todos")
fmt.Println(" When listing todos, you can filter and group the output.\n")
- fmt.Println(" todo l due (agenda|tod|today|tom|tomorrow|overdue|this week|next week|mon|tue|wed|thu|fri|sat|sun)")
+ fmt.Println(" todo l due (agenda|tod|today|tom|tomorrow|overdue|this week|next week|mon|tue|wed|thu|fri|sat|sun|none)")
fmt.Println(" todo l overdue")
cyan.Println(" Filtering by date:\n")
@@ -93,6 +93,8 @@ func usage() {
blueBold.Println("\nEditing due dates")
yellow.Println("\ttodo e 33 due mon")
fmt.Println("\tEdits the todo with 33 and sets the due date to this coming Monday\n")
+ yellow.Println("\ttodo e 33 due none")
+ fmt.Println("\tEdits the todo with 33 and removes the due date\n")
blueBold.Println("\nDeleting")
yellow.Println("\ttodo d 33")
diff --git a/todolist/parser.go b/todolist/parser.go
index a857f16..59a290a 100644
--- a/todolist/parser.go
+++ b/todolist/parser.go
@@ -55,6 +55,8 @@ func (p *Parser) Due(input string, day time.Time) string {
res := r.FindString(input)
res = res[4:len(res)]
switch {
+ case res == "none":
+ return ""
case res == "today":
return now.BeginningOfDay().Format("2006-01-02")
case res == "tomorrow" || res == "tom":