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

[Feature request] Exclude directory option #19

Closed
GaurangTandon opened this issue Aug 17, 2019 · 4 comments
Closed

[Feature request] Exclude directory option #19

GaurangTandon opened this issue Aug 17, 2019 · 4 comments
Assignees
Labels
done Finished working on the issue enhancement New feature or request

Comments

@GaurangTandon
Copy link

Is your feature request related to a problem? Please describe.

I wish to search through all directories in ~ except a few directories. Those few directories have active projects that I know I am working on and I do not want to run npkill on them.

Describe the solution you'd like

Pass a list of exclude directories, something like npkill --exclude-dir ~/my-projects/* which should make sure that npkill doesn't try to search inside the directory ~/my-projects.

Describe alternatives you've considered

I haven't.

Additional context

Not necessary.

@NyaGarcia
Copy link
Member

Great request :) It is actually one of the features in our TODO list, and will be available shortly. Thanks anyway for your suggestion!

@NyaGarcia NyaGarcia self-assigned this Aug 17, 2019
@zaldih zaldih added the enhancement New feature or request label Aug 17, 2019
@zaldih zaldih self-assigned this Sep 4, 2019
@zaldih zaldih added the in progress Working on resolving the issue label Sep 4, 2019
@zaldih zaldih added done Finished working on the issue and removed in progress Working on resolving the issue labels Sep 11, 2019
@NyaGarcia
Copy link
Member

This feature is now available in the newly released 🎆 0.6.0 version 🎆
You can exclude directories by using -E or --exclude options.

@pawel2105
Copy link

This feature is not working. I'm on v0.6.0 and each of the following 4 command variants:

npkill --exclude "/Users/pawel/Library/Caches/Yarn/*,"
npkill --exclude "/Users/pawel/Library/Caches/Yarn/*"
npkill --exclude "/Users/pawel/Library/Caches/Yarn"
npkill --exclude "/Users/pawel/Library/Caches/Yarn,"

Will still list directories like below:

/Users/pawel/Library/Caches/Yarn/v1/npm-fsevents-1.1.3-11f82318f5fe7bb2cd22965a108e9306208216d8/node_modules
/Users/pawel/Library/Caches/Yarn/v1/npm-fsevents-1.2.3-08292982e7059f6674c93d8b829c1e8604979ac0/node_modules

@muescha
Copy link

muescha commented Jul 3, 2021

@pawel2105 you can only use a folder name, in your case the "Yarn"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Finished working on the issue enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants