@@ -23,7 +23,7 @@ import Data.Yaml (decodeFileEither, prettyPrintParseException)
23
23
import GHC.IO.Encoding (setLocaleEncoding , utf8 )
24
24
import GitHash
25
25
import Options.Applicative
26
- import Paths_tasklite_core
26
+ import Paths_tasklite_core ()
27
27
import System.Directory
28
28
( createDirectoryIfMissing
29
29
, getHomeDirectory
@@ -68,6 +68,7 @@ data Command
68
68
| RepeatTasks Duration [IdText ]
69
69
| BoostTasks [IdText ]
70
70
| HushTasks [IdText ]
71
+ -- | Modify [IdText] Text -- DSL for modifying a task
71
72
72
73
{- Modify With Parameter -}
73
74
| Prioritize Float [IdText ]
@@ -93,7 +94,7 @@ data Command
93
94
| Ndjson
94
95
| Sql
95
96
| Backup
96
- -- | Fork -- Create a new SQLite database with the tasks of the specified query
97
+ -- | Fork -- Create new SQLite database with the tasks of the specified query
97
98
98
99
{- List -}
99
100
| ListAll
@@ -234,7 +235,9 @@ commandParser conf =
234
235
in
235
236
(pure ListReady )
236
237
<|>
237
- ( subparser ( commandGroup (T. unpack $ fst basic_sec)
238
+ ( subparser
239
+ ( metavar (T. unpack $ snd basic_sec)
240
+ <> commandGroup (T. unpack $ fst basic_sec)
238
241
239
242
<> command " add" (toParserInfo (AddTask <$> some (strArgument
240
243
(metavar " BODY" <> help " Body of the task" )))
@@ -254,7 +257,7 @@ commandParser conf =
254
257
" Set ready UTC of tasks" )
255
258
256
259
<> command " wait" (toParserInfo (WaitTasks <$> some (strArgument idsVar))
257
- " Mark a task as waiting (e.g. waiting for feedback)" )
260
+ " Mark a task as waiting (e.g. for feedback) and review it in 3 days " )
258
261
259
262
<> command " waitfor" (toParserInfo (WaitFor
260
263
<$> argument (maybeReader parseDurationInDays)
@@ -364,7 +367,9 @@ commandParser conf =
364
367
-- \with a timer of the past time since you started the task")
365
368
)
366
369
367
- <|> subparser ( commandGroup (T. unpack $ fst shortcut_sec)
370
+ <|> subparser
371
+ ( metavar (T. unpack $ snd shortcut_sec)
372
+ <> commandGroup (T. unpack $ fst shortcut_sec)
368
373
369
374
<> command " write" (toParserInfo (AddWrite <$> some (strArgument
370
375
(metavar " BODY" <> help " Body of the task" )))
@@ -400,7 +405,9 @@ commandParser conf =
400
405
" Ship an item to someone" )
401
406
)
402
407
403
- <|> subparser ( commandGroup (T. unpack $ fst list_sec)
408
+ <|> subparser
409
+ ( metavar (T. unpack $ snd list_sec)
410
+ <> commandGroup (T. unpack $ fst list_sec)
404
411
405
412
<> command " head" (toParserInfo (pure ListHead )
406
413
(" List " <> numTasks <> " most important open tasks by priority desc" ))
@@ -516,7 +523,9 @@ commandParser conf =
516
523
-- <> command "unblocked" -- Tasks that are not blocked (by priority)
517
524
)
518
525
519
- <|> subparser ( commandGroup (T. unpack $ fst vis_sec)
526
+ <|> subparser
527
+ ( metavar (T. unpack $ snd vis_sec)
528
+ <> commandGroup (T. unpack $ fst vis_sec)
520
529
-- <> command "kanban" -- "List tasks columnized by state"
521
530
-- <> command "burndown" -- "Burndown chart by week"
522
531
-- <> command "calendar" -- "Calendar view of all open tasks"
@@ -535,7 +544,9 @@ commandParser conf =
535
544
536
545
)
537
546
538
- <|> subparser ( commandGroup (T. unpack $ fst i_o_sec)
547
+ <|> subparser
548
+ ( metavar (T. unpack $ snd i_o_sec)
549
+ <> commandGroup (T. unpack $ fst i_o_sec)
539
550
540
551
<> command " import" (toParserInfo (pure Import )
541
552
" Import one JSON task from stdin" )
@@ -557,7 +568,9 @@ commandParser conf =
557
568
" Create a backup of the tasks database at ~/tasklite/backups" )
558
569
)
559
570
560
- <|> subparser ( commandGroup (T. unpack $ fst advanced_sec)
571
+ <|> subparser
572
+ ( metavar (T. unpack $ snd advanced_sec)
573
+ <> commandGroup (T. unpack $ fst advanced_sec)
561
574
562
575
<> command " count"
563
576
(toParserInfo
@@ -576,7 +589,9 @@ commandParser conf =
576
589
<> command " help" (toParserInfo (pure Help ) " Display current help page" )
577
590
)
578
591
579
- <|> subparser ( commandGroup (T. unpack $ fst unset_sec)
592
+ <|> subparser
593
+ ( metavar (T. unpack $ snd unset_sec)
594
+ <> commandGroup (T. unpack $ fst unset_sec)
580
595
581
596
-- <> command "unclose"
582
597
-- "Delete closed UTC and delete Obsolete / Done state"
@@ -738,7 +753,9 @@ helpText conf =
738
753
& spliceDocsIntoText helpReplacements
739
754
& hcat
740
755
in
741
- case (parserFailure defaultPrefs (commandParserInfo conf) ShowHelpText mempty ) of
756
+ case
757
+ (parserFailure defaultPrefs (commandParserInfo conf) ShowHelpText mempty )
758
+ of
742
759
ParserFailure a -> case a " tasklite" of
743
760
(theHelp, _, _) -> extendHelp theHelp
744
761
0 commit comments