[feature request] Allow filtering of `--choose` options by groups
It would be nifty if you could pre-filter the options passed to the chooser using group attributes.
For instance, suppose I create a build recipe that prompted the user to pick a more specific recipe from the build group:
test:
echo "Testing"
deploy:
echo "Deploying"
[group("build")]
frontend:
echo "Building frontend"
[group("build")]
backend:
echo "Building backend"
build:
@just --choose --choose-from-group build
And then when the user runs just build the chooser prompt would only show the options frontend and backend.
Love the project. Thank you for taking the time to read this.
I think this is reasonable. I would call the flag --choose-group just to be slightly less verbose.
Whoops, didn't mean to close!
Should --choose-group only take one arguments or be able to take for example a comma seperated list of groups ?
According this section of just book one can add more than one group to a recipe.
Should it then only show recipes which is a member of all the given groups.
Example:
test:
echo "Testing"
[group("build")]
deploy:
echo "Deploying"
[group("build")]
[group("frontend")]
manual_frontend:
echo "Building basic frontend"
[group("build")]
[group("frontend")]
user_frontend:
echo "Building fanzy frontend"
[group("build")]
backend:
echo "Building backend"
build:
@just --choose --choose-from-group build,frontend
Should it then only show the options user_frontend and manual_frontend because both are a member of the group "build" and "frontend".