Skip to content

Commit b70546a

Browse files
authored
Document which attributes apply to which items (#2282)
1 parent e20b62c commit b70546a

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

README.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,28 +1704,28 @@ $ just foo
17041704
0123456789abcdef
17051705
```
17061706

1707-
### Recipe Attributes
1708-
1709-
Recipes may be annotated with attributes that change their behavior.
1710-
1711-
| Name | Description |
1712-
|------|-------------|
1713-
| `[confirm]`<sup>1.17.0</sup> | Require confirmation prior to executing recipe. |
1714-
| `[confirm('PROMPT')]`<sup>1.23.0</sup> | Require confirmation prior to executing recipe with a custom prompt. |
1715-
| `[doc('DOC')]`<sup>1.27.0</sup> | Set recipe's [documentation comment](#documentation-comments) to `DOC`. |
1716-
| `[extension('EXT')]`<sup>1.32.0</sup> | Set shebang recipe script's file extension to `EXT`. `EXT` should include a period if one is desired. |
1717-
| `[group('NAME')]`<sup>1.27.0</sup> | Put recipe in [recipe group](#recipe-groups) `NAME`. |
1718-
| `[linux]`<sup>1.8.0</sup> | Enable recipe on Linux. |
1719-
| `[macos]`<sup>1.8.0</sup> | Enable recipe on MacOS. |
1720-
| `[no-cd]`<sup>1.9.0</sup> | Don't change directory before executing recipe. |
1721-
| `[no-exit-message]`<sup>1.7.0</sup> | Don't print an error message if recipe fails. |
1722-
| `[no-quiet]`<sup>1.23.0</sup> | Override globally quiet recipes and always echo out the recipe. |
1723-
| `[positional-arguments]`<sup>1.29.0</sup> | Turn on [positional arguments](#positional-arguments) for this recipe. |
1724-
| `[private]`<sup>1.10.0</sup> | See [Private Recipes](#private-recipes). |
1725-
| `[script]`<sup>master</sup> | Execute recipe as script. See [script recipes](#script-recipes) for more details. |
1726-
| `[script(COMMAND)]`<sup>1.32.0</sup> | Execute recipe as a script interpreted by `COMMAND`. See [script recipes](#script-recipes) for more details. |
1727-
| `[unix]`<sup>1.8.0</sup> | Enable recipe on Unixes. (Includes MacOS). |
1728-
| `[windows]`<sup>1.8.0</sup> | Enable recipe on Windows. |
1707+
### Attributes
1708+
1709+
Recipes, `mod` statements, and aliases may be annotated with attributes that change their behavior.
1710+
1711+
| Name | Type | Description |
1712+
|------|------|-------------|
1713+
| `[confirm]`<sup>1.17.0</sup> | recipe | Require confirmation prior to executing recipe. |
1714+
| `[confirm('PROMPT')]`<sup>1.23.0</sup> | recipe | Require confirmation prior to executing recipe with a custom prompt. |
1715+
| `[doc('DOC')]`<sup>1.27.0</sup> | module, recipe | Set recipe or module's [documentation comment](#documentation-comments) to `DOC`. |
1716+
| `[extension('EXT')]`<sup>1.32.0</sup> | recipe | Set shebang recipe script's file extension to `EXT`. `EXT` should include a period if one is desired. |
1717+
| `[group('NAME')]`<sup>1.27.0</sup> | module, recipe | Put recipe or module in in [group](#groups) `NAME`. |
1718+
| `[linux]`<sup>1.8.0</sup> | recipe | Enable recipe on Linux. |
1719+
| `[macos]`<sup>1.8.0</sup> | recipe | Enable recipe on MacOS. |
1720+
| `[no-cd]`<sup>1.9.0</sup> | recipe | Don't change directory before executing recipe. |
1721+
| `[no-exit-message]`<sup>1.7.0</sup> | recipe | Don't print an error message if recipe fails. |
1722+
| `[no-quiet]`<sup>1.23.0</sup> | recipe | Override globally quiet recipes and always echo out the recipe. |
1723+
| `[positional-arguments]`<sup>1.29.0</sup> | recipe | Turn on [positional arguments](#positional-arguments) for this recipe. |
1724+
| `[private]`<sup>1.10.0</sup> | alias, recipe | Make recipe or alias private. See [Private Recipes](#private-recipes). |
1725+
| `[script]`<sup>master</sup> | recipe | Execute recipe as script. See [script recipes](#script-recipes) for more details. |
1726+
| `[script(COMMAND)]`<sup>1.32.0</sup> | recipe | Execute recipe as a script interpreted by `COMMAND`. See [script recipes](#script-recipes) for more details. |
1727+
| `[unix]`<sup>1.8.0</sup> | recipe | Enable recipe on Unixes. (Includes MacOS). |
1728+
| `[windows]`<sup>1.8.0</sup> | recipe | Enable recipe on Windows. |
17291729

17301730
A recipe can have multiple attributes, either on multiple lines:
17311731

@@ -1816,9 +1816,9 @@ delete-everything:
18161816
rm -rf *
18171817
```
18181818

1819-
### Recipe Groups
1819+
### Groups
18201820

1821-
Recipes can be annotated with a group name:
1821+
Recipes and modules may be annotated with a group name:
18221822

18231823
```just
18241824
[group('lint')]
@@ -1844,7 +1844,6 @@ Recipes are listed by group:
18441844
```
18451845
$ just --list
18461846
Available recipes:
1847-
(no group)
18481847
email-everyone # not in any group
18491848
18501849
[lint]

0 commit comments

Comments
 (0)