From c10768bc5b64b10774d5a5b6d2018766e405b328 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 5 Mar 2020 19:18:06 -0800 Subject: [PATCH 1/2] Document behavior of `@` on shebang recipes 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. --- README.adoc | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.adoc b/README.adoc index 394870d4f9..29cffb5658 100644 --- a/README.adoc +++ b/README.adoc @@ -812,6 +812,35 @@ goodbye # 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 If the first argument passed to `just` contains a `/`, then the following occurs: From 6f7ce9b01f0fbd8a668c7fca9c968cb0492ac91e Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 5 Mar 2020 19:20:11 -0800 Subject: [PATCH 2/2] Formatting --- README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 29cffb5658..0b0452b1db 100644 --- a/README.adoc +++ b/README.adoc @@ -825,7 +825,7 @@ $ just foo Foo! ``` -Adding `@` to a shebang recipe name makes just print the recipe before executing it: +Adding `@` to a shebang recipe name makes `just` print the recipe before executing it: ```make