Remove offline mode since it' not implemented yet

main
staticvoid 2022-06-27 22:10:43 +03:00
parent d465f223ef
commit bfd3ad7535
2 changed files with 3 additions and 7 deletions

View File

@ -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

View File

@ -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)