, oNode
, oConfdAddr
, oConfdPort
+ , oInputFile
, genericOptions
) where
, optConfdAddr :: Maybe String -- ^ IP address of the Confd server
, optConfdPort :: Maybe Int -- ^ The port of the Confd server to
-- connect to
+ , optInputFile :: Maybe FilePath -- ^ Path to the file containing the
+ -- information to be parsed
} deriving Show
-- | Default values for the command line options.
, optNode = Nothing
, optConfdAddr = Nothing
, optConfdPort = Nothing
+ , optInputFile = Nothing
}
-- | Abbreviation for the option type.
"Network port of the Confd server to connect to",
OptComplInteger)
+oInputFile :: OptType
+oInputFile =
+ ( Option "f" ["file"]
+ (ReqArg (\ f o -> Ok o { optInputFile = Just f }) "FILE")
+ "the input FILE",
+ OptComplFile)
+
-- | Generic options.
genericOptions :: [GenericOptType Options]
genericOptions = [ oShowVer