bootandy / dust

A more intuitive version of du in rust
Apache License 2.0
8.57k stars 183 forks source link

Set up multiple invert-filter regex in config.toml #430

Closed svm-zhang closed 22 hours ago

svm-zhang commented 4 weeks ago

Hello,

Thank you for the awesome tool.

I have a question about setting up multiple invert filter REGEX in the config.toml file. I have checked the config example in the repo, as well as other tickets of similar matter. Could you please kindly show me an example?

I have also tried to add reverse=true and iso=true in the config.toml file, as shown in the config example. It seems that reverse=true gets cancelled by adding iso=true. Again, I likely did something wrong. Would be great if you could help me. Thanks again.

Simo

wugeer commented 3 weeks ago

Hello, I will try to answer your question.

Regarding your first question, currently, only the following parameter is supported in the config.toml file. image

Regarding your second question, since now iso is not a valid configurable parameter, an error occurred when parsing the config.toml file, which caused it to fall back to using the default empty configuration. In this case, the actual configuration is determined by the runtime parameters.

Now, this parameter has been replaced by output-format="si".

So you can refer to this for your config.toml content. image

I will submit a PR to update this file. image

svm-zhang commented 3 weeks ago

@wugeer, much appreciate your help. It makes sense. Hopefully, we could specify multiple REGEXs in an array in the TOML file in the future. I will keep using alias for now.

bootandy commented 3 weeks ago

Thank you @wugeer

svm-zhang commented 3 weeks ago

@bootandy, could I expect this be implemented as a feature in the future? Thanks

bootandy commented 1 week ago

I never thought people would want to put a regex filter in config, let alone multiple, but yes I think we can add that.

svm-zhang commented 22 hours ago

Thank you. I am learning Rust and if I feel comfortable with it in the near future, I will try to implement it and have a PR, given that this is likely a rare use case.