Quiet Recipes
A recipe name may be prefixed with @
to invert the meaning of @
before each line:
@quiet:
echo hello
echo goodbye
@# all done!
Now only the lines starting with @
will be echoed:
$ j quiet
hello
goodbye
# all done!
Shebang recipes are quiet by default:
foo:
#!/usr/bin/env bash
echo 'Foo!'
$ just foo
Foo!
Adding @
to a shebang recipe name makes just
print the recipe before executing it:
@bar:
#!/usr/bin/env bash
echo 'Bar!'
$ just bar
#!/usr/bin/env bash
echo 'Bar!'
Bar!
just
normally prints error messages when a recipe line fails. These error
messages can be suppressed using the [no-exit-message]
attribute. You may find
this especially useful with a recipe that recipe wraps a tool:
git *args:
@git {{args}}
$ just git status
fatal: not a git repository (or any of the parent directories): .git
error: Recipe `git` failed on line 2 with exit code 128
Add the attribute to suppress the exit error message when the tool exits with a non-zero code:
[no-exit-message]
git *args:
@git {{args}}
$ just git status
fatal: not a git repository (or any of the parent directories): .git