The Bash Argsparse Library 1.8
An high level argument parsing library for bash.
|
Functions | |
__argsparse_parse_options_valuecheck (option, value) | |
Check a value given to an option. | |
argsparse_check_option_type (type, value) | |
Check if a value matches a given type. | |
__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.
option | an option name. |
value | anything. |
0 | if value is correct for given option. |
argsparse_check_option_type | ( | type | , |
value | ) |
Check if a value matches a given type.
Return True if value is of type type.
type | A case-insensitive type name. |
value | a value to check. |
0 | if the value matches the given type format. |