Add option to limit view to certain units#21
Merged
rgwood merged 3 commits intorgwood:masterfrom May 25, 2024
Merged
Conversation
This allows a user to limit the view to certain units, which makes it
usable as a simple frontend for complex services:
```
systemctl-tui --limit-units abc\*.{service,timer}
```
Owner
|
Thanks for the PR! I think this is a good idea. I'll try to review it this week. |
rgwood
approved these changes
May 25, 2024
Owner
rgwood
left a comment
There was a problem hiding this comment.
This looks good, thank you for the contribution!
I made a tiny change to require at least 1 argument for limit_units. Otherwise, LGTM and I'll release a new version with this functionality soon.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, I've had an itch to have an overview for some application consisting of over a dozen unit files, so I've searched for something like this. I'm just submitting this as a draft so you or others can have look to see if it's interesting.
This allows a user to limit the view to certain units, which makes it usable as a simple service front end for complex services:
This also allows one to show other unit types besides just
.service. The UI doesn't support those, of course, but it seems to work fine with timers for now. And didn't even crash for.mount.Caveats:
Other unit types besides
servicearen't fully supported by the rest of the app.Maybe using a short option for such a niche use case isn't really necessary.
Also I'm a complete newbie in Rust, so this may leak memory or other fluids.