Problem
@ means opposite things depending on recipe kind:
- Line-wise recipes: verbose by default,
@ mutes a line (or, with set quiet, mutes the whole file and @ un-mutes).
- Shebang/script recipes: quiet by default,
@ does the opposite — it makes just print the script body before running it.
#603 tracked this exact inconsistency. Casey's take there was that flipping the hard-coded default for shebang recipes outright is too disruptive at this point (#603 (comment)). I followed up asking whether a setting to opt into the inversion (rather than changing the default for everyone) would be reasonable (#603 (comment)), but that didn't get picked up as its own issue.
Solution
Add a new justfile setting, analogous to set quiet (#1698), scoped to shebang/script recipes:
set script-quiet := true # default, current behavior: scripts are quiet, @ makes them print
set script-quiet := false # scripts are verbose by default, @ mutes them — same meaning as line-wise @
With script-quiet := false, just prints the script body before executing it unless the recipe is prefixed with @ (or annotated [quiet], mirroring [no-quiet] for the set quiet case). Default stays true, so nothing changes for existing justfiles — this is purely opt-in, sidestepping the breaking-change concern from #603.
End state once both settings are used together: @ always means "suppress output for this recipe," regardless of whether it's line-wise or script.
Problem
@means opposite things depending on recipe kind:@mutes a line (or, withset quiet, mutes the whole file and@un-mutes).@does the opposite — it makesjustprint the script body before running it.#603 tracked this exact inconsistency. Casey's take there was that flipping the hard-coded default for shebang recipes outright is too disruptive at this point (#603 (comment)). I followed up asking whether a setting to opt into the inversion (rather than changing the default for everyone) would be reasonable (#603 (comment)), but that didn't get picked up as its own issue.
Solution
Add a new justfile setting, analogous to
set quiet(#1698), scoped to shebang/script recipes:With
script-quiet := false,justprints the script body before executing it unless the recipe is prefixed with@(or annotated[quiet], mirroring[no-quiet]for theset quietcase). Default staystrue, so nothing changes for existing justfiles — this is purely opt-in, sidestepping the breaking-change concern from #603.End state once both settings are used together:
@always means "suppress output for this recipe," regardless of whether it's line-wise or script.