feat: support for args/flags

This commit is contained in:
Simon Lecoq
2023-11-08 05:31:25 +00:00
committed by GitHub
parent f9bc2a62a6
commit b54cabac16
5 changed files with 128 additions and 87 deletions

View File

@@ -66,17 +66,36 @@
},
"demo:flags": {
"description": "🎬 Demo: flags",
"task": "echo '$<foo> $<bar>'",
"task": [
"echo '0: $<0>' &&",
"echo '1: $<1>' &&",
"echo 'foo: $<foo>' &&",
"echo 'bar: $<bar>'"
],
"args": [
{
"alias": "0",
"required": true,
"description": "Example of required argument"
},
{
"alias": "1",
"default": true,
"description": "Example of optional argument"
}
],
"flags": {
"foo": {
"alias": "f",
"required": true,
"description": "Example of a required flag"
"description": "Example of a standard flag"
},
"bar": {
"alias": "b",
"default": "bar",
"description": "Example of a standard flag"
"description": "Example of a defaulted flag"
},
"baz": {
"description": "Example of a non-aliased flag"
}
}
},