diff options
author | Fabian Kirchner <kirchner@posteo.de> | 2023-10-13 22:51:12 +0200 |
---|---|---|
committer | Fabian Kirchner <kirchner@posteo.de> | 2023-10-13 22:51:12 +0200 |
commit | ddb4861554c96d2f3f3734eebc358f78c034da7d (patch) | |
tree | 95611baf34a8da7cdc1824dd90242764082c4feb /app/Main.hs | |
parent | 73f3b070e7f710bea00ad83f9714fba90a75974b (diff) |
only show prov info in show command
Diffstat (limited to 'app/Main.hs')
-rw-r--r-- | app/Main.hs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/app/Main.hs b/app/Main.hs index 334f3ce..5793363 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -88,7 +88,7 @@ import Options.Applicative ((<**>)) import Options.Applicative qualified as O import Prettyprinter qualified as P import Prettyprinter.Render.Terminal qualified as P -import Process (sh, sh_, quote) +import Process (quote, sh, sh_) import System.Exit (ExitCode (ExitFailure), exitWith) import System.FilePath qualified as F import System.Process.Typed qualified as P @@ -178,8 +178,7 @@ main = do ( \issue -> P.hsep ( concat - [ [P.pretty issue.provenance.firstCommit, P.pretty (" " :: String)], - [P.annotate P.bold (P.pretty issue.title)], + [ [P.annotate P.bold (P.pretty issue.title)], map ( \(I.Tag k v) -> P.annotate (P.colorDull P.Yellow) $ @@ -203,6 +202,19 @@ main = do issue.file ++ ":" ++ show issue.start.row + ++ ( case issue.provenance of + Nothing -> + "HEAD" + Just provenance -> + "\nvia " + ++ T.unpack provenance.firstCommit + ++ "\nby " + ++ T.unpack provenance.authorName + ++ " <" + ++ T.unpack provenance.authorEmail + ++ ">\nat " + ++ show provenance.date + ) ++ "\n\n" sh_ ( P.setStdin |