The Bash Argsparse Library  1.7
An high level argument parsing library for bash.
 All Files Functions Variables Groups
Functions | Variables
Calling program usage description message.

Functions

 argsparse_usage ()
 A generic help message generated from the options and their descriptions. More...
 
 argsparse_usage_long ()
 Fully describe and program and its options to the end-user. More...
 
 argsparse_usage_short ()
 Print a short description of the program syntax. More...
 
 set_option_help ()
 Default trigger for –help option. More...
 
 usage ()
 Default usage function. More...
 

Variables

String Array __argsparse_parameters_description
 Internal use only.
 
String argsparse_usage_description
 Usage description additionnal string. More...
 

Detailed Description

Function Documentation

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 and program and its 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 ( )

Default trigger for –help option.

Will actually only call usage().

Returns
Whatever usage() returns.
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.

Returns
This function makes an exit with code 1

Variable Documentation

String argsparse_usage_description

Usage description additionnal string.

The content of this variable will be appended to the argsparse_usage() output.