Skip to content

Fix -l/--limit flag not filtering unit files#76

Merged
rgwood merged 2 commits intomasterfrom
reilly.wood/fix-limit-units-filtering
Mar 24, 2026
Merged

Fix -l/--limit flag not filtering unit files#76
rgwood merged 2 commits intomasterfrom
reilly.wood/fix-limit-units-filtering

Conversation

@rgwood
Copy link
Copy Markdown
Owner

@rgwood rgwood commented Mar 24, 2026

Closes #75

get_unit_files() was hardcoding *.service as the pattern for list_unit_files_by_patterns, completely ignoring the user's -l filter. So when merge_unit_files() merged those results in, all disabled/static/masked services got added back to the list — making it look like -l did nothing.

The fix just threads limit_units through to get_unit_files() so it uses the same patterns as get_all_services().

Testing

Tested in tmux with systemctl-tui -l apparmor.service — before the fix it showed all services, after it shows only apparmor.

🤖 Generated with Claude Code

rgwood and others added 2 commits March 23, 2026 20:13
`get_unit_files()` was hardcoding `*.service` as the pattern for
`list_unit_files_by_patterns`, ignoring the user's `-l` filter. When
`merge_unit_files()` merged these results, all disabled/static/masked
services got added back to the list.

Closes #75

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rgwood rgwood marked this pull request as ready for review March 24, 2026 03:15
@rgwood rgwood merged commit 75dab75 into master Mar 24, 2026
1 check passed
@rgwood rgwood mentioned this pull request Mar 24, 2026
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.

Limit units not filtering

1 participant