[GH-ISSUE #46] Add an option to exclude a directory #20

Closed
opened 2026-06-08 11:25:19 +03:00 by zhus · 1 comment
Owner

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 / --exclude option would be useful. I can do the work if you think it is technically feasible. Any thoughts?

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` / `--exclude` option would be useful. I can do the work if you think it is technically feasible. Any thoughts?
zhus closed this issue 2026-06-08 11:25:19 +03:00
Author
Owner

@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 .*) ?

<!-- gh-comment-id:568455810 --> @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 .*) ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#20