File tree 2 files changed +16
-3
lines changed
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ data Command
116
116
| ListOld
117
117
| ListOpen
118
118
| ListModified
119
+ | ListModifiedOnly
119
120
| ListDone
120
121
| ListObsolete
121
122
| ListDeletable
@@ -465,7 +466,10 @@ commandParser conf =
465
466
" List all open tasks by priority desc" )
466
467
467
468
<> command " modified" (toParserInfo (pure ListModified )
468
- " List all modified tasks by modified_utc desc" )
469
+ " List all tasks by modified_utc desc" )
470
+
471
+ <> command " modified-only" (toParserInfo (pure ListModifiedOnly )
472
+ " List all modified tasks by modified_utc desc" )
469
473
470
474
-- All tasks due to no later than
471
475
-- <> command "yesterday"
@@ -858,6 +862,7 @@ executeCLiCommand conf now connection cmd =
858
862
ListOld -> listOldTasks conf now connection
859
863
ListOpen -> openTasks conf now connection
860
864
ListModified -> modifiedTasks conf now connection
865
+ ListModifiedOnly -> modifiedOnlyTasks conf now connection
861
866
ListOverdue -> overdueTasks conf now connection
862
867
ListRepeating -> listRepeating conf now connection
863
868
ListRecurring -> listRecurring conf now connection
Original file line number Diff line number Diff line change @@ -1571,8 +1571,17 @@ openTasks conf now connection = do
1571
1571
\order by `priority` desc"
1572
1572
pure $ formatTasks conf now tasks
1573
1573
1574
+
1574
1575
modifiedTasks :: Config -> DateTime -> Connection -> IO (Doc AnsiStyle )
1575
- modifiedTasks conf now connection =
1576
+ modifiedTasks conf now connection = do
1577
+ tasks <- query_ connection $ Query
1578
+ " select * from `tasks_view` \
1579
+ \order by `modified_utc` desc"
1580
+ pure $ formatTasks conf now tasks
1581
+
1582
+
1583
+ modifiedOnlyTasks :: Config -> DateTime -> Connection -> IO (Doc AnsiStyle )
1584
+ modifiedOnlyTasks conf now connection =
1576
1585
let
1577
1586
filterModified =
1578
1587
P. filter (\ task ->
@@ -1588,7 +1597,6 @@ modifiedTasks conf now connection =
1588
1597
" select * from `tasks_view` \
1589
1598
\order by `modified_utc` desc"
1590
1599
pure $ formatTasks conf now $ filterModified tasks
1591
-
1592
1600
1593
1601
1594
1602
overdueTasks :: Config -> DateTime -> Connection -> IO (Doc AnsiStyle )
You can’t perform that action at this time.
0 commit comments