Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept disk path(s) to display usage of specified disk / multiple disks #286

Open
Rolv-Apneseth opened this issue Apr 23, 2023 · 3 comments
Labels
area/config Has something to do with the configuration mechanism. type/feature Request a new feature.

Comments

@Rolv-Apneseth
Copy link
Contributor

Rolv-Apneseth commented Apr 23, 2023

I have most of the code for this feature done, but I'll wait for the libmacchina crate to be updated to 8.0.0 so it can accept the paths.

My current approach is to add a new option called disks which can be used like this in the config:

disks = ["/", "/home/user"]

Or like this as an argument:

--disks '/,/home/user/'

Note that the show option of DiskSpace would still be required, as otherwise disks won't do anything. I did it this way to avoid a rewrite of how the show values are currently handled. The other way I thought of doing this was making show into an array of tables but that seems overly complicated and it's a breaking change to everyone's configs. What do you think of the approach I took / did I maybe miss a simpler approach?

@grtcdr grtcdr added area/config Has something to do with the configuration mechanism. type/feature Request a new feature. labels May 13, 2024
@grtcdr grtcdr changed the title [FEATURE] Accept disk path(s) to display usage of specified disk / multiple disks Accept disk path(s) to display usage of specified disk / multiple disks May 13, 2024
@Rolv-Apneseth
Copy link
Contributor Author

Rolv-Apneseth commented Sep 15, 2024

Checked it out again briefly and - did the code from Macchina-CLI/libmacchina#156 get reverted? I would need that, or something like that, for this feature as otherwise / is hard coded. I believe that's why I mentioned here about waiting for 8.0.0 as that was a breaking change

Edit: forgot to ping in case you're not subscribed, @grtcdr

@grtcdr
Copy link
Member

grtcdr commented Sep 16, 2024

It wasn't reverted, I think I just moved the v8 stuff to its own branch, 8.0.0. We will eventually merge 8.0.0 onto master again, would you mind working against that branch?

@Rolv-Apneseth
Copy link
Contributor Author

Ah, I see, my bad. Yes I can do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config Has something to do with the configuration mechanism. type/feature Request a new feature.
Development

No branches or pull requests

2 participants