The Bash Argsparse Library
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 ()
 
 argsparse_usage_short ()
 
 set_option_help ()
 Default trigger for –help option. More...
 
 usage ()
 Default usage function. More...
 

Variables

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 ( )

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 ( )

Generate and print the "short" description of the program usage.

set_option_help ( )

Default trigger for –help option.

will actually only call "usage" function.

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 value 1

Variable Documentation

String argsparse_usage_description

Usage description additionnal string.

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