diff --git a/app/Cli.hs b/app/Cli.hs index 5fc80bb..db369db 100644 --- a/app/Cli.hs +++ b/app/Cli.hs @@ -15,8 +15,7 @@ import Options.Applicative -- TODO: add debug data Options = Options - { offline :: Bool - , noAnsi :: Bool + { noAnsi :: Bool , columns :: Maybe Integer , choice :: Choice } @@ -24,8 +23,7 @@ data Options = Options optsParser :: Parser Options optsParser = - Options <$> switch (long "offline" <> short 'N' <> help "only access cache") - <*> switch (long "no-ansi" <> short 'A' <> help "disable ANSI codes") + Options <$> switch (long "no-ansi" <> short 'A' <> help "disable ANSI codes") <*> (Just <$> option auto (metavar "COLUMNS_NUMBER" <> long "columns" <> short 'c' <> help "number of columns") <|> pure Nothing) <*> choiceParser diff --git a/app/Main.hs b/app/Main.hs index 558104d..cfd0887 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -57,9 +57,7 @@ program GetTopic{topic_id} = do main :: IO () main = do - Options{offline, noAnsi, choice} <- getOpts - when offline do - error "Offline mode is not yet implemented" + Options{noAnsi, choice} <- getOpts manager' <- newManager $ defaultManagerSettings & (managerSetProxy $ proxyEnvironmentNamed "I2P_HTTP_PROXY" $ Just defProxy)