core/config

configuration file support library

Dependency Graph

core/config: Library Dependencies

View the full-size SVG (svg) or PDF (pdf) image or graphviz source (dot)

View color source code (raw) for this file

View reStructuredText (rst) source code for this page

Library Initialization

core_config_lib_init()

Other libs use config_init, so use lib_init.

$config_types[]

List of valid types of configuration files

Default: sys user pkg

$sys_configs[]

Lists the system library configurations to load.

$tool_configs[]

Lists the system tool configurations to load.

$user_configs[]

Lists the user library configurations to load.

$usertool_configs[]

Lists the user tool configurations to load.

$pkg_configs[]

Lists the package configurations to load.

Default: none

$config_debug

If set to true true, permits errors in the configuration to allow debugging.

Default: false

$config_init_check

Set to true to in order to perform early checking of configuration settings, after initialization but prior to loading any configuration files.

Default: false

Configuration Filenames

config_sys_filename()

Prints system configuration filename (located in $confdir)

config_sys_tool_filename()

Prints system tool configuration filename (located in $confdir/$script_group/$script_name)

config_user_filename()

Prints user configuration filename (located in $user_confdir)

config_usertool_filename()

Prints user configuration filename (located in $user_confdir/$script_group/$script_name)

config_pkg_filename()

Prints package configuration filename (located in $srcdir)

Configuration Files

config_script_filenames()

Prints name of script configuration filenames

config_lib_filenames()

Prints name of library configuration filenames

Public Functions

config_error()

Generates a warning or error, depending on whether $config_debug is true or false respectively.

Configuration Initialization

config_init()

Initializes all library and tool settings, prior to loading any configuration files.

TODO: fix config_check callbacks to permit checking here

config_init_lib()

Initializes configuration settings for the named library ($1).

Configuration Validation

config_check()

Ensures all configuration settings are valid

config_check_lib()

Ensures configuration settings are valid for the name library ($1).

Configuration File Reading

config_read()

Reads a single configuration file ($1)

$1 - filename

config_read_files()

Reads a list of configuration files ($@)

Configuration File Loading

config_load()

Reads all known configuration files.

config_load_kind()

Reads configuration files of the given type ($1). See $config_types[] for available types.

config_load_lib()

Loads configuration files for the named library ($1)

Config CLI

config_usage()

Prints usage for the config command namespace.

config_files()

Prints the named list ($1) of configuration files.

$1 - Type of configuration files: all, sys, user, or pkg.

config_files_all()

Prints a list of all configuration files.

config_names()

Prints list of active configuration settings.

config_values()

Prints list of configuration settings name/value pairs for the given list of setting names ($@).

config_show()

Prints active configuration settings for a given library ($1) or all active scripts (if none given).

$1 - Library name (optional). If null, prints all script settings.


View the Developer Guide Index

View the Reference Manual Index


Generated on Fri Jul 28 14:37:07 PDT 2017 by mcsh d14 v0.23.0.