The Bash Argsparse Library 1.8
An high level argument parsing library for bash.
|
Functions | |
argsparse_describe_parameters (param...) | |
Describe non-option positionnal parameters. | |
argsparse_usage () | |
A generic help message generated from the options and their descriptions. | |
argsparse_usage_long () | |
Fully describe the program syntax and options to the end-user. | |
argsparse_usage_short () | |
Print a short description of the program syntax. | |
set_option_help () | |
Default trigger for –help option. | |
usage () | |
Default usage function. | |
Variables | |
String Array | __argsparse_parameters_description |
Internal use only. | |
String | argsparse_usage_description |
Usage description additionnal string. | |
argsparse_describe_parameters | ( | param... | ) |
Describe non-option positionnal parameters.
This function has currently 2 purposes:
param... | a list of label describing positionnal parameters. These labels can have special forms such as:
|
0 |
argsparse_usage | ( | ) |
A generic help message generated from the options and their descriptions.
Will print both a rather-short and a quite long description of the program and its options. Just provided to be wrapped in your own usage().
argsparse_usage_long | ( | ) |
Fully describe the program syntax and options to the end-user.
This function generates and prints the "long" description of the program usage. Print all options along with their descriptions provided to argsparse_use_option().
argsparse_usage_short | ( | ) |
Print a short description of the program syntax.
Generate and print the "short" description of the program usage.
set_option_help | ( | ) |
usage | ( | ) |
Default usage function.
The default usage function. By default, it will be called by argsparse_parse_options() on error or if –help option provided by user on the command line. It can easily be overwritten if it does not suits your needs.
String argsparse_usage_description |
Usage description additionnal string.
The content of this variable will be appended to the argsparse_usage() output.