Document behavior of @ on shebang recipes (#602)

Shebang recipes have the somewhat confusing property of being quiet by
default, with `@` before a shebang recipe name causing just to print out
the recipe before executing it.

This is somewhat questionable behavior, since it's the opposite of
linewise recipes, but it should be documented, even if it might change
in the future.
This commit is contained in:
Casey Rodarmor 2020-03-05 19:24:53 -08:00 committed by GitHub
parent 19402bb8e5
commit a7ce94f63e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -812,6 +812,35 @@ goodbye
# all done! # all done!
``` ```
Shebang recipes are quiet by default:
```make
foo:
#!/usr/bin/env bash
echo 'Foo!'
```
```sh
$ just foo
Foo!
```
Adding `@` to a shebang recipe name makes `just` print the recipe before executing it:
```make
@bar:
#!/usr/bin/env bash
echo 'Bar!'
```
```sh
$ just bar ~/src/just
#!/usr/bin/env bash
echo 'Bar!'
Bar!
```
=== Invoking Justfiles in Other Directories === Invoking Justfiles in Other Directories
If the first argument passed to `just` contains a `/`, then the following occurs: If the first argument passed to `just` contains a `/`, then the following occurs: