From: Felix Fietkau Date: Sat, 4 Aug 2007 12:23:46 +0000 (+0000) Subject: document config_foreach, close #2162 X-Git-Tag: reboot~28413 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b20b8d15237a8b8caffab003f33cfe8872b50c24;p=oweals%2Fopenwrt.git document config_foreach, close #2162 SVN-Revision: 8342 --- diff --git a/docs/config.tex b/docs/config.tex index d13297c4f7..17417c99a1 100644 --- a/docs/config.tex +++ b/docs/config.tex @@ -57,6 +57,19 @@ after \texttt{config\_load} is done. 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 [] [] +\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: @@ -80,3 +93,9 @@ Syntax: config_set