functions with:
\begin{Verbatim}
-. /etc/functions.sh
+. /lib/functions.sh
\end{Verbatim}
Then you can use \texttt{config\_load \textit{<name>}} to load config files. The function
If you want to use special callbacks for sections and/or options, you
need to define the following shell functions before running \texttt{config\_load}
-(after including \texttt{/etc/functions.sh}):
+(after including \texttt{/lib/functions.sh}):
\begin{Verbatim}
config_cb() {
That allows you to process sections both before and after all options were
processed.
+Another way of iterating on config sections is using the \texttt{config\_foreach} command.
+
+Syntax:
+\begin{Verbatim}
+config_foreach <function name> [<sectiontype>] [<arguments...>]
+\end{Verbatim}
+
+This command will run the supplied function for every single config section in the currently
+loaded config. The section name will be passed to the function as argument 1.
+If the section type is added to the command line, the function will only be called for
+sections of the given type.
+
+
You can access already processed options with the \texttt{config\_get} command
Syntax:
config_set <section> <option> <value>
\end{Verbatim}
+If a config section is unnamed, an automatically generated name will
+be assigned internally, e.g. \texttt{cfg1}, \texttt{cfg2}, ...
+
+While it is possible, using unnamed sections through these autogenerated names is
+strongly discouraged. Use callbacks or \texttt{config\_foreach} instead.
+