casey / casey/just

Hide parameters and/or defaults in `--list`

Open
#2,819 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
35.8k
Forks
846
Avg merge
27m
Merged PRs (30d)
3

Description

>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`:
```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:
```bash
$ 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:
```bash
$ 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`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.