The Bash Argsparse Library 1.8
An high level argument parsing library for bash.
Functions
...

Functions

 __argsparse_parse_options_valuecheck (option, value)
 Check a value given to an option. More...
 
 argsparse_check_option_type (type, value)
 Check if a value matches a given type. More...
 

Detailed Description

Function Documentation

◆ __argsparse_parse_options_valuecheck()

__argsparse_parse_options_valuecheck ( option  ,
value   
)

Check a value given to an option.

If an enumeration has been defined for the option, check against that. If there's no enumeration, but option has a type property, then check against the type. In the end, check against check_value_of_<option> function, if it's been defined.

Parameters
optionan option name.
valueanything.
Return values
0if value is correct for given option.

◆ argsparse_check_option_type()

argsparse_check_option_type ( type  ,
value   
)

Check if a value matches a given type.

Return True if value is of type type.

Parameters
typeA case-insensitive type name.
valuea value to check.
Return values
0if the value matches the given type format.