just icon indicating copy to clipboard operation
just copied to clipboard

[feat]: hide default values of recipe parameters in `--list`

Open fidelicura opened this issue 7 months ago • 2 comments

I'm very sorry if such a feature has already been proposed and/or implemented. I haven't found it.

Problem

Assume, we've got the following recipe in Justfile:

alias echoer := cool
[doc("very nice description of my pretty recipe")]
cool VALUE1="coolparameter" VALUE2="niceparameter" VALUE3="wowparameter":
    echo {{ VALUE1 }} {{ VALUE2 }} {{ VALUE3 }}

When it is shown in a list of available recipes, it takes quite large space on a screen:

$ just --list
Available recipes:
    cool VALUE1="coolparameter" VALUE2="niceparameter" VALUE3="wowparameter" # very nice description of my pretty recipe [alias: echoer]

Solution

I suggest a new command-line flag to hide default values of recipe parameters: --hide-parameters-default-values (negotiable name, if needed). It should transform the list to the following format:

$ just --list --hide-parameters-default-values
Available recipes:
    cool VALUE1,VALUE2,VALUE3 # very nice description of my pretty recipe [alias: echoer]

Meta

  • System: Arch Linux.
  • Version: 1.41.0.
  • Repository: pacman.

fidelicura avatar Jul 15 '25 19:07 fidelicura

I'll be happy to study the source code and implement the feature myself.

fidelicura avatar Jul 15 '25 19:07 fidelicura

Ah I just reported a near-duplicate: https://github.com/casey/just/issues/2881

Would love to see this feature. :)

nbanmp avatar Sep 10 '25 18:09 nbanmp