These comments wrapped between # ---
are called Metadata.
Each module must have Metadata at top.
# ---
# Category: XXX
# Usage: l.public_function arguments [options]
# Description: function description
# Dependent: a,b,c
# Deprecated: false
# Since: <version>
# Bash: 4.0
# Status: tested
# ---
The Metadata is order insensitive.
Attention: Exactly # ---
. No more or less spaces and -
.
It is required.
Available values:
- Arithmetic
- Array
- Condition
- Console
- Debug
- File
- Path
- Prompt
- String
- System
- Terminal
- Time
- Util
- Lobash
These values must be upper camel case.
It is optional. Default to false
.
Available values:
false
true
If true, shell will print a warning log to stderr when load this module.
It is optional.
An array of module names which current module dependents on.
Dependencies must be separated with ,
.
It is required.
It indicates this module added since what version.
Available values: The Lobash release version.
The usage format must follow the http://docopt.org/ .
And public_function must start with l.
.
It is optional.
Any descriptions of module. It can be multiple.
It is optional. Default to 4.0
.
The minimum version of Bash which Lobash supports.
It is optional. Default to tested
.
Available values:
tested
It is hidden.
The module name, based on module filename.
Currently, only be shown in ./bin/lobash meta
.
It is optional.
It records something important.