-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
10 changed files
with
228 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,26 +169,28 @@ Add a metadata. | |
> **<sup>Syntax</sup>**\ | ||
> `@meta` [_name_] [_value_]<sup>?</sup> | ||
| syntax | scope | description | | ||
| :--------------------------- | ------ | :------------------------------------------------------------------- | | ||
| `@meta version <value>` | any | Set the version for the command. | | ||
| `@meta author <value>` | any | Set the author for the command. | | ||
| `@meta dotenv [<path>]` | root | Load a dotenv file from a custom path, if persent. | | ||
| `@meta symbol <param>` | any | Define a symbolic parameter, e.g. `+toolchain`, `@argument-file`. | | ||
| `@meta man-section <1-8>` | root | Override the section for the man page, defaulting to 1. | | ||
| `@meta default-subcommand` | subcmd | Set the current subcommand as the default. | | ||
| `@meta inherit-flag-options` | root | Subcommands will inherit the flags/options from their parent. | | ||
| `@meta no-inherit-env` | subcmd | Subcommands will not inherit the @env from their parent. | | ||
| `@meta combine-shorts` | root | Short flags/options can be combined, e.g. `prog -xf => prog -x -f `. | | ||
| syntax | scope | description | | ||
| :------------------------------- | ------ | :------------------------------------------------------------------- | | ||
| `@meta version <value>` | any | Set the version for the command. | | ||
| `@meta author <value>` | any | Set the author for the command. | | ||
| `@meta dotenv [<path>]` | root | Load a dotenv file from a custom path, if persent. | | ||
| `@meta default-subcommand` | subcmd | Set the current subcommand as the default. | | ||
| `@meta require-tools <tool>,...` | any | Require certain tools to be available on the system. | | ||
| `@meta man-section <1-8>` | root | Override the section for the man page, defaulting to 1. | | ||
| `@meta inherit-flag-options` | root | Subcommands will inherit the flags/options from their parent. | | ||
| `@meta no-inherit-env` | subcmd | Subcommands will not inherit the @env from their parent. | | ||
| `@meta combine-shorts` | root | Short flags/options can be combined, e.g. `prog -xf => prog -x -f `. | | ||
| `@meta symbol <param>` | any | Define a symbolic parameter, e.g. `+toolchain`, `@argument-file`. | | ||
|
||
|
||
```sh | ||
# @meta version 1.0.0 | ||
# @meta author nobody <[email protected]> | ||
# @meta dotenv | ||
# @meta dotenv .env.local | ||
# @meta symbol +toolchain[`_choice_fn`] | ||
# @meta require-tools git,yq | ||
# @meta man-section 8 | ||
# @meta symbol +toolchain[`_choice_fn`] | ||
``` | ||
|
||
## Deprecated tags | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# @describe Demonstrate how to use require-tools meta | ||
|
||
# @meta require-tools curl,sed | ||
|
||
# @cmd | ||
# @meta require-tools git | ||
cmd1() { | ||
:; | ||
} | ||
|
||
# @cmd | ||
# @meta require-tools not-found | ||
cmd2() { | ||
:; | ||
} | ||
|
||
eval "$(argc --argc-eval "$0" "$@")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.