hledger-1.42: Command-line interface for the hledger accounting system
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hledger.Cli.Conf

Description

Read extra CLI arguments from a hledger config file.

Synopsis

Documentation

getConf :: RawOpts -> IO (Conf, Maybe FilePath) Source #

Try to read a hledger config from a config file specified by --conf, or the first config file found in any of several default file paths. If --no-conf was used, or if no file was specified or found, this returns a null Conf. If a specified file, or the first file found, can not be read or parsed, this raises an error. Otherwise this returns the parsed Conf, and the file path.

confLookup :: SectionName -> Conf -> [Arg] Source #

Fetch all the arguments/options defined in a section with this name, if it exists. This should be "general" for the unnamed first section, or a hledger command name.