summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Teng <i@mahane.me>2023-10-11 20:56:35 +0100
committerGitHub <noreply@github.com>2023-10-11 19:56:35 +0000
commit0c6484f3a9fae96c4a227325059c29f4a8410244 (patch)
tree3702391bdccd1ddcc36b02175561027034ec1110
parent22e103361ffcee9b9e6f837d9e81dc00e8f9ba42 (diff)
Add version to attributes (#1694)
-rw-r--r--README.md22
-rw-r--r--README.中文.md22
2 files changed, 23 insertions, 21 deletions
diff --git a/README.md b/README.md
index 7145ab3e..f385d55b 100644
--- a/README.md
+++ b/README.md
@@ -1241,15 +1241,15 @@ These functions can fail, for example if a path does not have an extension, whic
Recipes may be annotated with attributes that change their behavior.
-| Name | Description |
-| ------------------- | ----------------------------------------------- |
-| `[no-cd]` | Don't change directory before executing recipe. |
-| `[no-exit-message]` | Don't print an error message if recipe fails. |
-| `[linux]` | Enable recipe on Linux. |
-| `[macos]` | Enable recipe on MacOS. |
-| `[unix]` | Enable recipe on Unixes. (Includes MacOS). |
-| `[windows]` | Enable recipe on Windows. |
-| `[private]` | See [Private Recipes](#private-recipes). |
+| Name | Description |
+| ----------------------------------- | ----------------------------------------------- |
+| `[no-cd]`<sup>1.9.0</sup> | Don't change directory before executing recipe. |
+| `[no-exit-message]`<sup>1.7.0</sup> | Don't print an error message if recipe fails. |
+| `[linux]`<sup>1.8.0</sup> | Enable recipe on Linux. |
+| `[macos]`<sup>1.8.0</sup> | Enable recipe on MacOS. |
+| `[unix]`<sup>1.8.0</sup> | Enable recipe on Unixes. (Includes MacOS). |
+| `[windows]`<sup>1.8.0</sup> | Enable recipe on Windows. |
+| `[private]`<sup>1.10.0</sup> | See [Private Recipes](#private-recipes). |
A recipe can have multiple attributes, either on multiple lines:
@@ -1268,7 +1268,7 @@ foo:
echo "foo"
```
-#### Enabling and Disabling Recipes
+#### Enabling and Disabling Recipes<sup>1.8.0</sup>
The `[linux]`, `[macos]`, `[unix]`, and `[windows]` attributes are
configuration attributes. By default, recipes are always enabled. A recipe with
@@ -2168,7 +2168,7 @@ Bar!
```
`just` normally prints error messages when a recipe line fails. These error
-messages can be suppressed using the `[no-exit-message]` attribute. You may find
+messages can be suppressed using the `[no-exit-message]`<sup>1.7.0</sup> attribute. You may find
this especially useful with a recipe that recipe wraps a tool:
```just
diff --git a/README.中文.md b/README.中文.md
index 473af4ab..54e04fd6 100644
--- a/README.中文.md
+++ b/README.中文.md
@@ -1201,16 +1201,18 @@ The executable is at: /bin/just
配方可以通过添加属性注释来改变其行为。
-| 名称 | 描述 |
-| ------------------- | -------------------------------------- |
-| `[no-cd]` | 在执行配方之前不要改变目录。 |
-| `[no-exit-message]` | 如果配方执行失败,不要打印错误信息。 |
-| `[linux]` | 在Linux上启用配方。 |
-| `[macos]` | 在MacOS上启用配方。 |
-| `[unix]` | 在Unixes上启用配方。 |
-| `[windows]` | 在Windows上启用配方。 |
-#### 启用和禁用配方
+| 名称 | 描述 |
+| ----------------------------------- | -------------------------------------- |
+| `[no-cd]`<sup>1.9.0</sup> | 在执行配方之前不要改变目录。 |
+| `[no-exit-message]`<sup>1.7.0</sup> | 如果配方执行失败,不要打印错误信息。 |
+| `[linux]`<sup>1.8.0</sup> | 在Linux上启用配方。 |
+| `[macos]`<sup>1.8.0</sup> | 在MacOS上启用配方。 |
+| `[unix]`<sup>1.8.0</sup> | 在Unixes上启用配方。 |
+| `[windows]`<sup>1.8.0</sup> | 在Windows上启用配方。 |
+| `[private]`<sup>1.10.0</sup> | 参见 [私有配方](#私有配方). |
+
+#### 启用和禁用配方<sup>1.8.0</sup>
`[linux]`, `[macos]`, `[unix]` 和 `[windows]` 属性是配置属性。默认情况下,配方总是被启用。一个带有一个或多个配置属性的配方只有在其中一个或多个配置处于激活状态时才会被启用。
@@ -2050,7 +2052,7 @@ echo 'Bar!'
Bar!
```
-`just` 在配方行失败时通常会打印错误信息,这些错误信息可以通过 `[no-exit-message]` 属性来抑制。你可能会发现这在包装工具的配方中特别有用:
+`just` 在配方行失败时通常会打印错误信息,这些错误信息可以通过 `[no-exit-message]`<sup>1.7.0</sup> 属性来抑制。你可能会发现这在包装工具的配方中特别有用:
```just
git *args: