aboutsummaryrefslogtreecommitdiffstats
path: root/app/Main.hs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2023-10-23 09:55:28 +0200
committerLibravatar Alexander Foremny <aforemny@posteo.de>2023-11-07 09:50:52 +0100
commit1127c71fa5f5c5a3d6bfde818cb00eb26e9d4cb3 (patch)
tree003e76b6690461aff107999fcc4e1b54c6efb294 /app/Main.hs
parent8c6ab0cbb68ef2deaf575b0eb341fd6c652e1848 (diff)
add settings
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 274bfa4..3e9dc1d 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -459,6 +459,7 @@ import Prettyprinter ((<+>))
import Prettyprinter qualified as P
import Prettyprinter.Render.Terminal qualified as P
import Process (proc, sh_, textInput)
+import Settings (Settings (..), readSettings)
import System.Console.Terminal.Size qualified as Terminal
import System.Exit (ExitCode (ExitFailure), exitWith)
import System.IO (hClose, hFlush)
@@ -600,6 +601,7 @@ die s = do
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}} -> do
let withinPath issue = if null files then True else any (\file -> file `isPrefixOf` issue.file) files