@@ -130,7 +130,7 @@ data Command
130130-- | Demo -- Switch to demo mode
131131 | Version -- Show version
132132-- | License -- Show license
133- | Alias Text
133+ | Alias Text (Maybe [Text])
134134 | Help
135135 | PrintConfig
136136 | UlidToUtc Text
@@ -144,16 +144,17 @@ nameToAliasList = (
144144 ("clone", "duplicate") :
145145 ("close", "end") :
146146 ("decrease", "hush") :
147+ ("erase", "delete") :
147148 ("finish", "do") :
148149 ("fix", "do") :
149150 ("implement", "do") :
150151 ("inbox", "notag") :
151152 ("increase", "boost") :
152153 ("remove", "delete") :
153--- ("reopen", "unclose") :
154+ ("reopen", "unclose") :
154155 ("rm", "delete") :
155- ("stop", "end") :
156156 ("search", "find") :
157+ ("stop", "end") :
157158-- ("week", "sunday") :
158159-- ("latest", "newest") :
159160-- ("schedule", "activate") :
@@ -184,8 +185,8 @@ aliasWarning alias =
184185getCommand :: (Text, Text) -> Mod CommandFields Command
185186getCommand (alias, commandName) =
186187 command (T.unpack alias) $ info
187- (pure $ Alias commandName)
188- (progDesc $ T.unpack $ "-> " <> commandName)
188+ ((pure $ Alias commandName) <*> (optional $ some $ strArgument idm))
189+ (progDesc $ T.unpack $ alias <> "-> " <> commandName)
189190190191191192toParserInfo :: Parser a -> Text -> ParserInfo a
@@ -208,15 +209,15 @@ basic_sec, shortcut_sec, list_sec,
208209 alias_sec, unset_sec, utils_sec
209210:: (Text, Text)
210211211-basic_sec = ("{{basic_sec}}", "Basic Commands:")
212-shortcut_sec = ("{{shortcut_sec}}", "Shortcuts to Add a Task:")
213-list_sec = ("{{list_sec}}", "List Commands:")
214-vis_sec = ("{{vis_sec}}", "Visualizations:")
215-i_o_sec = ("{{i_o_sec}}", "I/O Commands:")
216-advanced_sec = ("{{advanced_sec}}", "Advanced Commands:")
217-alias_sec = ("{{alias_sec}}", "Aliases:")
218-unset_sec = ("{{unset_sec}}", "Unset:")
219-utils_sec = ("{{utils_sec}}", "Utils:")
212+basic_sec = ("{{basic_sec}}", "Basic Commands")
213+shortcut_sec = ("{{shortcut_sec}}", "Shortcuts to Add a Task")
214+list_sec = ("{{list_sec}}", "List Commands")
215+vis_sec = ("{{vis_sec}}", "Visualizations")
216+i_o_sec = ("{{i_o_sec}}", "I/O Commands")
217+advanced_sec = ("{{advanced_sec}}", "Advanced Commands")
218+alias_sec = ("{{alias_sec}}", "Aliases")
219+unset_sec = ("{{unset_sec}}", "Unset Commands")
220+utils_sec = ("{{utils_sec}}", "Utils")
220221221222222223parseDurationInDays :: [Char] -> Maybe Duration
@@ -604,7 +605,11 @@ commandParser conf =
604605<> fold (fmap getCommand nameToAliasList)
605606 )
606607607-<|> subparser ( commandGroup (T.unpack $ fst utils_sec)
608+<|> subparser (internal <> fold (fmap getCommand nameToAliasList))
609+610+<|> subparser
611+ ( metavar (T.unpack $ snd utils_sec)
612+<> commandGroup (T.unpack $ fst utils_sec)
608613609614<> command "ulid2utc" (toParserInfo
610615 (UlidToUtc <$> strArgument (metavar "ULID" <> help "The ULID"))
@@ -711,7 +716,7 @@ helpReplacements =
711716"Task-list manager powered by Haskell and SQLite") :
712717 ("{{examples}}", examples) :
713718fmap
714- (\(a, b) -> (a, annotate (colorDull Yellow) (pretty b)))
719+ (\(a, b) -> (a, annotate (colorDull Yellow) (pretty b <> ":")))
715720 (
716721 basic_sec :
717722 shortcut_sec :
@@ -812,7 +817,7 @@ executeCLiCommand conf now connection cmd =
812817Version -> pure $ pretty versionSlug <> hardline
813818Help -> pure $ helpText conf
814819PrintConfig -> pure $ pretty conf
815-Alias alias -> pure $ aliasWarning alias
820+Alias alias _ -> pure $ aliasWarning alias
816821UlidToUtc ulid -> pure $ prettyUlid ulid
817822818823