diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-11-09 15:43:28 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-11-09 15:47:28 +0100 |
commit | a37d3605e40b5c9c125568045e0fb99e9796fe49 (patch) | |
tree | d2a16285cd3724580e2db5f5d04b8f217b4ac873 /app/Main.hs | |
parent | 12511580c732895e8c5d045e18803a766ed733b8 (diff) |
group-by -> group
Diffstat (limited to 'app/Main.hs')
-rw-r--r-- | app/Main.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/Main.hs b/app/Main.hs index a51ba1e..d6a263a 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -422,7 +422,7 @@ import Issue (Issue (..)) import Issue qualified as I import Issue.Filter (Filter, applyFilters) import Issue.Filter qualified as I -import Issue.GroupBy qualified as I +import Issue.Group qualified as I import Issue.Provenance qualified as I import Issue.Sort (Sort, applySorts) import Issue.Sort qualified as I @@ -514,7 +514,7 @@ data Command { files :: [String], filters :: [Filter], sort :: [Sort], - groupBy :: Maybe T.Text + group :: Maybe T.Text } | Log | Show @@ -543,7 +543,7 @@ listCmd = <$> filesArg <*> I.filterArg <*> I.sortArg - <*> I.groupByArg + <*> I.groupArg logCmd :: O.Parser Command logCmd = @@ -586,10 +586,10 @@ main :: IO () main = do settings <- readSettings O.execParser (O.info (options <**> O.helper) O.idm) >>= \case - Options {colorize, noPager, width, command = List {sort, filters, files, groupBy = Just groupBy}} -> do + Options {colorize, noPager, width, command = List {sort, filters, files, group = Just group}} -> do let withinPath issue = if null files then True else any (\file -> file `isPrefixOf` issue.file) files ungroupedIssues <- applySorts sort . applyFilters filters . filter withinPath . fst <$> getHistory - let groupedIssues = I.groupIssuesBy groupBy ungroupedIssues + let groupedIssues = I.groupIssuesBy group ungroupedIssues putDoc colorize noPager width . P.vsep . intersperse ("" :: P.Doc ann) @@ -598,7 +598,7 @@ main = do P.vsep $ ( P.annotate P.bold . P.annotate (P.color P.Yellow) $ ( ( P.annotate P.bold $ - (("@" :: P.Doc ann) <> P.pretty groupBy) <+> P.pretty name + (("@" :: P.Doc ann) <> P.pretty group) <+> P.pretty name ) <+> ("(" :: P.Doc ann) <> P.pretty (length issues) @@ -612,7 +612,7 @@ main = do issues ) (M.toList groupedIssues) - Options {internalTags, colorize, noPager, width, command = List {sort, filters, files, groupBy = Nothing}} -> do + Options {internalTags, colorize, noPager, width, command = List {sort, filters, files, group = Nothing}} -> do let withinPath issue = if null files then True else any (\file -> file `isPrefixOf` issue.file) files issues <- applySorts sort . applyFilters filters . filter withinPath . fst <$> getHistory putDoc colorize noPager width . P.vsep $ |