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

Add an option to exclude a directory #46

Closed
ZNielsen opened this issue Dec 20, 2019 · 1 comment
Closed

Add an option to exclude a directory #46

ZNielsen opened this issue Dec 20, 2019 · 1 comment

Comments

@ZNielsen
Copy link

ZNielsen commented Dec 20, 2019

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?

@bootandy
Copy link
Owner

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

bootandy added a commit that referenced this issue Jan 18, 2020
#46

Add -X flag used to ignore any file or directory that matches the
provided substring.
This means that -X e will ignore any file or directory with an 'e' in
it.
bootandy added a commit that referenced this issue Jan 19, 2020
#46

Add -X flag used to ignore any file or directory that matches the
provided substring.
This means that -X e will ignore any file or directory with an 'e' in
it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants