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

Emphasize that variable assignments can use functions. #2431

Merged
merged 3 commits into from
Oct 30, 2024
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1292,19 +1292,19 @@ Available recipes:

### Variables and Substitution

Variables, strings, concatenation, path joining, and substitution using `{{…}}`
are supported:
Variables, strings, concatenation, path joining, substitution using `{{…}}`, and function calls are supported:

```just
tmpdir := `mktemp -d`
version := "0.2.7"
tardir := tmpdir / "awesomesauce-" + version
tarball := tardir + ".tar.gz"
config := quote(config_dir() / ".project-config")

publish:
rm -f {{tarball}}
mkdir {{tardir}}
cp README.md *.c {{tardir}}
cp README.md *.c {{ config }} {{tardir}}
tar zcvf {{tarball}} {{tardir}}
scp {{tarball}} [email protected]:release/
rm -rf {{tarball}} {{tardir}}
Expand Down Expand Up @@ -1497,8 +1497,8 @@ Done!

### Functions

`just` provides a few built-in functions that might be useful when writing
recipes.
`just` provides many built-in functions for use in expressions, including
recipe body `{{…}}` substitutions, assignments, and default parameter values.

All functions ending in `_directory` can be abbreviated to `_dir`. So
`home_directory()` can also be written as `home_dir()`. In addition,
Expand Down