Hi, I'm loving using just as a basic task runner! It's made working with my projects much easier.
I'm wondering if the project would consider adding custom named arguments that could be passed into recipes as variables?
I'd love to use:
just build --foo 42 --bar -f
Currently we can use recipe parameters however they must be supplied in order making it difficult to combine optional parameters with variadic arguments
Take for instance this use case:
profile := env_var_or_default("profile", "")
run *ARGS:
cargo run {{ if profile != "" { " --profile " + profile } else { "" } }} {{ARGS}}
profile=release-lto just run foo bar
> cargo run --profile release-lto foo bar
profile is an optional value passed in as an environment variable however it isn't listed when running just --list
It would be great if just supported optional custom named arguments, as long as they didn't conflict with existing keys so the above could be consumed as
just run --profile release-lto foo bar
> cargo run --profile release-lto foo bar
just --list
> Available recipes:
> run --profile="" *ARGS=""
Hi, I'm loving using
just
as a basic task runner! It's made working with my projects much easier.I'm wondering if the project would consider adding custom named arguments that could be passed into recipes as variables?
I'd love to use:
Currently we can use recipe parameters however they must be supplied in order making it difficult to combine optional parameters with variadic arguments
Take for instance this use case:
profile
is an optional value passed in as an environment variable however it isn't listed when runningjust --list
It would be great if
just
supported optional custom named arguments, as long as they didn't conflict with existing keys so the above could be consumed asThanks 🙏