You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to have named arguments on recipes that fall back to a default value with the last argument being a variadic argument - like this:
just run ./fixture/test-fixture
> cargo run -- ./fixture/test-fixture
just run target=release ./fixture/test-fixture
> cargo run --target release -- ./fixture/test-fixture
However I cannot find an approach for this in the docs. The closest I have come was to use arguments with conditional expressions - however the variadic argument supersedes the recipe argument.
just run ./fixture/test-fixture
> cargo run --profile dev -- profile=dev ./fixture/test-fixture
just run target=release ./fixture/test-fixture
> cargo run --profile dev -- profile=release
just run hello-world
> cargo run --profile dev -- hello-world
just run profile=release hello-world
> cargo run --profile release -- hello-world
just -l
> Available recipes:
> build #profile="dev"
> run #profile="dev" *ARGS
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'd like to have named arguments on recipes that fall back to a default value with the last argument being a variadic argument - like this:
However I cannot find an approach for this in the docs. The closest I have come was to use arguments with conditional expressions - however the variadic argument supersedes the recipe argument.
But that results in
EDIT:
Env Vars
I can use environment variables:
but I'd like to be able to list them as part of
just -l
so they are discoverable and autocompletion could work, however env vars don't workSuggestion
Ideally I'd be able to use optional named recipie arguments along with variadic arguments so they can be listed with
just -l
and ignored if omitted.This isn't valid just config but like this:
Where I could invoke it with
Beta Was this translation helpful? Give feedback.
All reactions