Skip to content

Commit

Permalink
Document settings in readme (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Nov 12, 2019
1 parent d52b8f2 commit 9f82ed9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,45 @@ echo '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
Comments immediately preceding a recipe will appear in `just --list`:
Expand Down

0 comments on commit 9f82ed9

Please sign in to comment.