Skip to content

Add --group flag to filter --list output by group#3117

Merged
casey merged 10 commits intocasey:masterfrom
terror:list-groups
Mar 10, 2026
Merged

Add --group flag to filter --list output by group#3117
casey merged 10 commits intocasey:masterfrom
terror:list-groups

Conversation

@terror
Copy link
Copy Markdown
Contributor

@terror terror commented Mar 10, 2026

Resolves #3109, #2662, #2195, #2922

This diff adds a --group <GROUP> flag to the --list subcommand that restricts output to recipes belonging to the specified group. The flag can be repeated to show multiple groups. For instance, just --list --group deploy shows only recipes annotated with [group('deploy')], and just --list --group deploy --group test shows recipes in either group, each under its own group heading.

Copy link
Copy Markdown
Owner

@casey casey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an argument to --group isn't actually a group, it should result in an error.

Currently, it actually prints out the group but with no recipes:

: just --list --group barasdfasdf
Available recipes:
    [barasdfasdf]

Comment thread src/config.rs Outdated
Comment thread src/config.rs Outdated
Comment thread src/config.rs Outdated
Comment thread src/config.rs Outdated
@terror terror requested a review from casey March 10, 2026 15:15
Comment thread src/subcommand.rs Outdated
Copy link
Copy Markdown
Owner

@casey casey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@casey casey merged commit 312bff4 into casey:master Mar 10, 2026
6 checks passed
@terror terror deleted the list-groups branch March 11, 2026 01:15
renovate Bot added a commit to sdwilsh/ansible-playbooks that referenced this pull request Mar 15, 2026
##### [\`1.47.0\`](https://github.com/casey/just/blob/HEAD/CHANGELOG.md#1470---2026-03-14)

##### Added

- Add lazy evaluation setting ([#3083](casey/just#3083) by [casey](https://github.com/casey))
- Add guard sigil `?` ([#2547](casey/just#2547) by [casey](https://github.com/casey))
- Add `--group` flag to filter `--list` output by group ([#3117](casey/just#3117) by [terror](https://github.com/terror))
- Add attributes for DragonFly BSD, FreeBSD, and NetBSD ([#3115](casey/just#3115) by [jakewilliami](https://github.com/jakewilliami))
- Add `[env(NAME, VALUE)` recipe attribute ([#2957](casey/just#2957) by [neunenak](https://github.com/neunenak))

##### Changed

- Make `--timestamp` print timestamps unconditionally ([#3114](casey/just#3114) by [casey](https://github.com/casey))
- Print `--timestamps` with script recipes ([#3050](casey/just#3050) by [casey](https://github.com/casey))
- `[private]` modules are excluded from `--list` output ([#2889](casey/just#2889) by [Scott-Guest](https://github.com/Scott-Guest))

##### Misc

- Fix readme typo ([#3122](casey/just#3122) by [Rohan5commit](https://github.com/Rohan5commit))
- Move choose and run into match statement ([#3120](casey/just#3120) by [casey](https://github.com/casey))
- Add uv install instructions to readme ([#3062](casey/just#3062) by [npikall](https://github.com/npikall))
- Suppress error when --choose is cancelled by user ([#3098](casey/just#3098) by [cobyfrombrooklyn-bot](https://github.com/cobyfrombrooklyn-bot))
- Test formatting justfile with undefined variable succeeds ([#3110](casey/just#3110) by [casey](https://github.com/casey))
- Format without compiling ([#3103](casey/just#3103) by [terror](https://github.com/terror))
- Fix Gentoo installation instructions ([#3085](casey/just#3085) by [DarthGandalf](https://github.com/DarthGandalf))
- Deny unreachable pub ([#3080](casey/just#3080) by [casey](https://github.com/casey))
- Fix readme typo ([#3079](casey/just#3079) by [pvinis](https://github.com/pvinis))
- Include blank chapters in book ([#3076](casey/just#3076) by [casey](https://github.com/casey))
- Clean up build script ([#3078](casey/just#3078) by [casey](https://github.com/casey))
- Increase stack size on Windows ([#3077](casey/just#3077) by [casey](https://github.com/casey))
- Fix readme typo ([#3066](casey/just#3066) by [kenden](https://github.com/kenden))
- Remove dependency on executable-path ([#3058](casey/just#3058) by [casey](https://github.com/casey))
- Fix typos ([#3056](casey/just#3056) by [galenseilis](https://github.com/galenseilis))
- Avoid conditional compilation in integration tests ([#3055](casey/just#3055) by [casey](https://github.com/casey))
- Assert exit status last in `Test` builder ([#3054](casey/just#3054) by [casey](https://github.com/casey))
- Remove makedeb/MPR installation instructions ([#3053](casey/just#3053) by [Chengings](https://github.com/Chengings))
- Handle errors when checking for files ([#3051](casey/just#3051) by [casey](https://github.com/casey))
renovate Bot added a commit to sdwilsh/ansible-playbooks that referenced this pull request Mar 15, 2026
##### [\`1.47.0\`](https://github.com/casey/just/blob/HEAD/CHANGELOG.md#1470---2026-03-14)

##### Added

- Add lazy evaluation setting ([#3083](casey/just#3083) by [casey](https://github.com/casey))
- Add guard sigil `?` ([#2547](casey/just#2547) by [casey](https://github.com/casey))
- Add `--group` flag to filter `--list` output by group ([#3117](casey/just#3117) by [terror](https://github.com/terror))
- Add attributes for DragonFly BSD, FreeBSD, and NetBSD ([#3115](casey/just#3115) by [jakewilliami](https://github.com/jakewilliami))
- Add `[env(NAME, VALUE)` recipe attribute ([#2957](casey/just#2957) by [neunenak](https://github.com/neunenak))

##### Changed

- Make `--timestamp` print timestamps unconditionally ([#3114](casey/just#3114) by [casey](https://github.com/casey))
- Print `--timestamps` with script recipes ([#3050](casey/just#3050) by [casey](https://github.com/casey))
- `[private]` modules are excluded from `--list` output ([#2889](casey/just#2889) by [Scott-Guest](https://github.com/Scott-Guest))

##### Misc

- Fix readme typo ([#3122](casey/just#3122) by [Rohan5commit](https://github.com/Rohan5commit))
- Move choose and run into match statement ([#3120](casey/just#3120) by [casey](https://github.com/casey))
- Add uv install instructions to readme ([#3062](casey/just#3062) by [npikall](https://github.com/npikall))
- Suppress error when --choose is cancelled by user ([#3098](casey/just#3098) by [cobyfrombrooklyn-bot](https://github.com/cobyfrombrooklyn-bot))
- Test formatting justfile with undefined variable succeeds ([#3110](casey/just#3110) by [casey](https://github.com/casey))
- Format without compiling ([#3103](casey/just#3103) by [terror](https://github.com/terror))
- Fix Gentoo installation instructions ([#3085](casey/just#3085) by [DarthGandalf](https://github.com/DarthGandalf))
- Deny unreachable pub ([#3080](casey/just#3080) by [casey](https://github.com/casey))
- Fix readme typo ([#3079](casey/just#3079) by [pvinis](https://github.com/pvinis))
- Include blank chapters in book ([#3076](casey/just#3076) by [casey](https://github.com/casey))
- Clean up build script ([#3078](casey/just#3078) by [casey](https://github.com/casey))
- Increase stack size on Windows ([#3077](casey/just#3077) by [casey](https://github.com/casey))
- Fix readme typo ([#3066](casey/just#3066) by [kenden](https://github.com/kenden))
- Remove dependency on executable-path ([#3058](casey/just#3058) by [casey](https://github.com/casey))
- Fix typos ([#3056](casey/just#3056) by [galenseilis](https://github.com/galenseilis))
- Avoid conditional compilation in integration tests ([#3055](casey/just#3055) by [casey](https://github.com/casey))
- Assert exit status last in `Test` builder ([#3054](casey/just#3054) by [casey](https://github.com/casey))
- Remove makedeb/MPR installation instructions ([#3053](casey/just#3053) by [Chengings](https://github.com/Chengings))
- Handle errors when checking for files ([#3051](casey/just#3051) by [casey](https://github.com/casey))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow filter by group for recipes in --list

2 participants