From 1127c71fa5f5c5a3d6bfde818cb00eb26e9d4cb3 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Mon, 23 Oct 2023 09:55:28 +0200 Subject: add settings --- app/Main.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/Main.hs') 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 -- cgit v1.2.3