Document settings in readme (#527)
This commit is contained in:
parent
d52b8f22a3
commit
9f82ed9015
39
README.adoc
39
README.adoc
@ -233,6 +233,45 @@ echo 'Building!'
|
|||||||
Building!
|
Building!
|
||||||
```
|
```
|
||||||
|
|
||||||
|
=== Settings
|
||||||
|
|
||||||
|
Settings control interpetation and execution. Each setting may be specified at most once, anywhere in the justfile.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```make
|
||||||
|
|
||||||
|
set shell := ["zsh", "-cu"]
|
||||||
|
|
||||||
|
foo:
|
||||||
|
# this line will be run as `zsh -cu 'ls **/*.txt'`
|
||||||
|
ls **/*.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
==== Table of Settings
|
||||||
|
|
||||||
|
[options="header"]
|
||||||
|
|=================
|
||||||
|
| Name | Value | Description
|
||||||
|
|`shell` | `[COMMAND, ARGS...]` | Set the command used to invoke recipes and evaluate backticks.
|
||||||
|
|=================
|
||||||
|
|
||||||
|
==== Shell
|
||||||
|
|
||||||
|
The `shell` setting controls the command used to invoke recipe lines and backticks. Shebang recipes are unaffected.
|
||||||
|
|
||||||
|
```make
|
||||||
|
# use python3 to execute recipe lines and backticks
|
||||||
|
set shell := ["python3", "-c"]
|
||||||
|
|
||||||
|
# use print to capture result of evaluation
|
||||||
|
foos := `print("foo" * 4)`
|
||||||
|
|
||||||
|
foo:
|
||||||
|
print("Snake snake snake snake.")
|
||||||
|
print("{{foos}}")
|
||||||
|
```
|
||||||
|
|
||||||
=== Documentation Comments
|
=== Documentation Comments
|
||||||
|
|
||||||
Comments immediately preceding a recipe will appear in `just --list`:
|
Comments immediately preceding a recipe will appear in `just --list`:
|
||||||
|
Loading…
Reference in New Issue
Block a user