Remove offline mode since it' not implemented yet
parent
d465f223ef
commit
bfd3ad7535
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue