mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[GH-ISSUE #46] Add an option to exclude a directory #20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ZNielsen on GitHub (Dec 20, 2019).
Original GitHub issue: https://github.com/bootandy/dust/issues/46
Hey there! Love dust and find it very useful. I would like to have an option to exclude directories from the search/listing though. Is there a way to do this (I don't see it in the help menu)? If not, I think adding a
-X/--excludeoption would be useful. I can do the work if you think it is technically feasible. Any thoughts?@bootandy commented on GitHub (Dec 23, 2019):
If you want to add it I will merge the code.
You probably want to pass a 'excluded list down to here': https://github.com/bootandy/dust/blob/master/src/utils/mod.rs#L112 and then ignore things in the list.
Also watch out for this bug: https://github.com/bootandy/dust/issues/44 which shows up on small test directories. I'll fix soon that soon, but I don't want you thinking you've broken it.
Do you think when we do this that we should also add an option for'.' ie:
-X .to exclude all hidden files (ie .*) ?