Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document settings in readme #527

Merged
merged 5 commits into from
Nov 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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