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

"dust -X node_modules" only removes the current directory's node_modules, not nested ones #453

Open
edbrannin opened this issue Dec 5, 2024 · 1 comment · May be fixed by #456
Open

Comments

@edbrannin
Copy link

(Maybe I should just be using dust -v node_modules, but in that case the --help text seems misleading)

Per the helptext:

bruno % dust --help | grep -E 'ignore|invert'
  -X, --ignore-directory <PATH>    Exclude any file or directory with this name
  -I, --ignore-all-in-file <FILE>  Exclude any file or directory with a regex matching that listed in this file, the file entries will be added to the ignore regexs provided by --invert_filter
  -i, --ignore_hidden              Do not display hidden files
  -v, --invert-filter <REGEX>      Exclude filepaths matching this regex. To ignore png files type: -v "\.png$"

With a name like "Exclude any file or directory with this name", it seems like:

  1. -X node_modules should ignore both node_modules and subdir/node_modules
  2. I only need -v if I wanted to match partial filenames with a regex.

Result using dust -X

ebrannin@ebrannin-mbp bruno % dust -X node_modules | grep node_modules
 64M       ┌─┴ node_modules            │███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  │   9%
 64M     │ ┌─┴ node_modules            │███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  │   9%
 64M     │ ┌─┴ node_modules            │███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  │   9%
bruno %

Result using dust -v

(also my desired result of using dust -X

bruno % dust -v node_modules | grep node_modules
bruno %
@Its-Just-Nans
Copy link
Contributor

Its-Just-Nans commented Dec 30, 2024

Hello

As written in the --help, it's:

  • -X <PATH>
  • -v <REGEX>

@Its-Just-Nans Its-Just-Nans linked a pull request Dec 30, 2024 that will close this issue
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 a pull request may close this issue.

2 participants