Skip to content

Commit

Permalink
Document using functions in variable assignments (#2431)
Browse files Browse the repository at this point in the history
  • Loading branch information
offby1 authored Oct 30, 2024
1 parent a71f2a5 commit 528c9f0
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 528c9f0

Please sign in to comment.