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 support for depth and case sensitivity in directory exclusions, by directory #110

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

ghecko
Copy link
Contributor

@ghecko ghecko commented Oct 15, 2024

Enhanced --exclude-dir to accept the format DIRNAME[:DEPTH[:CASE]], allowing users to define:

  • DEPTH: Specify recursion depth. -1 for all depths, default is 0 (current directory only).
  • CASE: Specify case sensitivity. i for case-insensitive, or s for case-sensitive (default).

Example

Exclude directories named snapshot at current directory level, case-sensitive (default):

find -iname "*.ps1" --exclude-dir snapshot .

Exclude temp directories until depth 2, case-insensitive:

find -iname "*.ps1" --exclude-dir temp:2:i .

Exclude multiple directory:

find -iname "*.ps1" --exclude-dir temp:2:i --exclude .git:-1 .

@p0dalirius p0dalirius merged commit f254563 into p0dalirius:main Oct 15, 2024
0 of 2 checks passed
@p0dalirius
Copy link
Owner

Thank you for the PR!

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

Successfully merging this pull request may close these issues.

2 participants