Skip to content

FEAT: Make printing recipe listing include recipe arguments as well #3517

Description

@starfishpatkhoo

Feature Request:

  • Make recipe listing include ARG options as well...
  • Format ARG options display to match recipe doc style
# Do some test stuff
[arg("MYVAR",short="f",value="booya",help="somehelp")]
test MYVAR:
    echo {{ if "foo" == MYVAR { "yeah" } else { "nope" } }}
    echo {{ MYVAR }}

Currently, assuming set default-list := true (or someone did just --list)

# just
Available recipes:
    test [OPTIONS] # Do some test stuff
#
# just --usage test
Usage: just test [OPTIONS]
Options:
  -f somehelp

What I'm suggesting is to print the options together with the list:

# just
Available recipes:
    test [OPTIONS] # Do some test stuff
        -f somehelp

Also, the options doc message should be styled the same way as the recipe's.. There should be a # before the ARG help message right?

Options:
  -f # somehelp

in the same style as:

    test [OPTIONS] # Do some test stuff

Yes, adding the options to the listing could become very long, but I would argue that's the same as someone doing just --help. In this way, set default-list := true or just --list provides users with most everything they need to know in one single command/option, like just --help. just --usage can remain for people who need to know more about the usage of a specific recipe they are targeting.

Just an idea.. ^_^

Ref orig discussion: #3510

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions