Next: , Previous: , Up: actions   [Contents][Index]

8.3 Dispatching action arguments

Function: mbfl_actions_dispatch action-set

Parse the next command line argument and select accordingly the functions for the main module making use of the functions:


If successful return true, else return false and print an error message to stderr. This function recursively calls itself, parsing command line arguments and traversing the tree of declared actions.

action-set must be the name of an action set previously declared with mbfl_declare_action_set(). It is an error if this function is called with an action-set name specifying a non–existent action set. If there are no command line arguments left upon entering this function: the values previously selected are silently accepted.

The function mbfl_main() verifies that the action set MAIN exists and, if it does, it calls this function with argument MAIN.

Upon entering this function, the following global variables must exist and have the specified values:


An array containing all the command line arguments.


A non–negative integer representing the number of values in ARGV1.


A non–negative integer representing the index in ARGV1 of the next argument to be processed.

all these variables are created by default by the MBFL main module, Command line arguments variables.

Next: , Previous: , Up: actions   [Contents][Index]

This document describes version 3.0.0-devel.0 of Marcos Bash Functions Library.