Skip to content

Can glob directory exclusion work at the same time as extension exclusion? #1603

Answered by BurntSushi
tuxayo asked this question in General
Discussion options

You must be logged in to vote

Hmm, I cannot reproduce:

$ mkdir -p foo/my-lib

$ touch stuff.js stuff2.js my-other-lib.min.js foo/my-lib/{a,b}.js

$ rg --files
stuff.js
stuff2.js
my-other-lib.min.js
foo/my-lib/b.js
foo/my-lib/a.js

$ rg --files -g '*.js' -g '!*.min.js'
stuff.js
stuff2.js
foo/my-lib/b.js
foo/my-lib/a.js

$ rg --files -g '*.js' -g '!{*.min.js,foo/my-lib/*}'
stuff.js
stuff2.js

$ rg --files -g '{*.js}' -g '!{*.min.js,foo/my-lib/*}'
stuff.js
stuff2.js

$ rg --files -g '{*.js}' -g '!{foo/my-lib/*,*.min.js}'
stuff.js
stuff2.js

A few questions for you:

  1. What version of ripgrep are you using? How did you install it?
  2. Can you try running the same commands as above, but with the --debug flag?

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@tuxayo
Comment options

@BurntSushi
Comment options

@tuxayo
Comment options

Answer selected by tuxayo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants