Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
neunenak committed May 16, 2024
1 parent 73e721d commit 0e81744
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,7 @@ Recipes may be annotated with attributes that change their behavior.
|------|-------------|
| `[confirm]`<sup>1.17.0</sup> | Require confirmation prior to executing recipe. |
| `[confirm("prompt")]`<sup>1.23.0</sup> | Require confirmation prior to executing recipe with a custom prompt. |
| `[group("group name")]`<sup>1.27.0</sup> | See [Recipe Groups](#recipe-groups)]|
| `[linux]`<sup>1.8.0</sup> | Enable recipe on Linux. |
| `[macos]`<sup>1.8.0</sup> | Enable recipe on MacOS. |
| `[no-cd]`<sup>1.9.0</sup> | Don't change directory before executing recipe. |
Expand Down Expand Up @@ -1618,6 +1619,49 @@ delete-everything:
rm -rf *
```

### Recipe Groups

Recipes can be optionally marked as belonging to one or more groups:

```just
[group: lint]
js-lint:
echo "Runninng javascript linter"
[group("rust jobs")]
[group: lint]
rust-lint:
echo "Runninng rust linter"
# Not in a group
email-everyone:
echo "Sending out mass email
```

`[group: lint]` is a shorthand equivalent to `[group("lint")]`.

When listing recipes, they will be sorted by group:

```
$ just --list
Available recipes:
(no group)
email-everyone # Not in a group
[group: lint]
js-lint
rust-lint
[group: rust jobs]
rust-lint
```

Use `--groups` to see a list in alphabetical order of all the groups used in a justfile:

```
$ just --groups
lint
rust jobs
```

### Command Evaluation Using Backticks

Backticks can be used to store the result of commands:
Expand Down

0 comments on commit 0e81744

Please sign in to comment.