sharkdp / diskus

A minimal, fast alternative to 'du -sh'
Apache License 2.0
1.02k stars 35 forks source link

[Feature] Support hidden, ignore-files #47

Closed zachriggle closed 2 years ago

zachriggle commented 2 years ago

It's not uncommon that I want to run diskus on some directory, but want it to ignore certain types of files:

--hidden

It would be nice to be able to ignore hidden files when computing the total. The flag --[no-]hidden should be available to control this. The default behavior of diskus should not change.

--ignore-file (and related things from RipGrep)

Being able to specify an --ignore-file or --[no-]ignore-vcs flag in order to not descend into e.g. a build/ directory.

Ripgrep has several related options (for .gitignore, .rgignore, and general --ignore-file) that might be useful to coopt.

The default behavior of diskus should not change.

Just Make a Pull Request

My employer does not permit FOSS contributions, otherwise I would take a stab at doing this myself.

sharkdp commented 2 years ago

Thank you for your request. I don't intend on adding more features to diskus:

A minimal, fast alternative to du -sh.

diskus is a very simple program

diskus uses a custom parallel directory walker (unlike fd, which uses ripgreps ignore crate) and it will be difficult to add things like .gitignore handling. Ignoring hidden directories/files might be easy, but I think I prefer not to add this as a feature.

I'm sorry if the "marketing" on the README suggests something else, but so far, I really see this project more like a prototype of how fast a disk-usage tool could be.