aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 560c36c..c0995be 100644
--- a/README.md
+++ b/README.md
@@ -71,6 +71,18 @@ main() {
eval "$(argc --argc-eval "$0" "$@")"
```
+The relationship between flags/options and parameters in function declarations is as follows:
+
+```sh
+# @flag --boolean Parameter `{"type": "boolean"}`
+# @option --string Parameter `{"type": "string"}`
+# @option --string-enum[foo|bar] Parameter `{"type": "string", "enum": ["foo", "bar"]}`
+# @option --integer <INT> Parameter `{"type": "integer"}`
+# @option --number <NUM> Parameter `{"type": "number"}`
+# @option --array* <VALUE> Parameter `{"type": "array", "items": {"type":"string"}}`
+# @option --scalar-required! Use `!` to mark a scalar parameter as required.
+# @option --array-required+ Use `+` to mark a array parameter as required
+```
**After creating your function, don't forget to rebuild the function declarations.**