question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Globbing doesn't do recursion

See original GitHub issue

To get recursion, I have to add an additional /** per directory level. So for a directory nested four levels in, I have to target **/**/**/**. Is this expected behavior? I’m on Windows, but I do everything in the bash - globbing always works as expected.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
tekmavencommented, Jun 24, 2015

Here is the output:

C:\Temp\test\renamer-test>npm test

> renamer-test@1.0.0 test C:\Temp\test\renamer-test
> renamer -f .txt -r .yeah -d one/**

Dry run
√ one\file1.txt -> one\file1.yeah
√ one\file2.txt -> one\file2.yeah
√ one\file3.txt -> one\file3.yeah
√ one\two\file1.txt -> one\two\file1.yeah
√ one\two\file2.txt -> one\two\file2.yeah
√ one\two\file3.txt -> one\two\file3.yeah
√ one\two\three\file1.txt -> one\two\three\file1.yeah
√ one\two\three\file2.txt -> one\two\three\file2.yeah
√ one\two\three\file3.txt -> one\two\three\file3.yeah
0reactions
75lbcommented, Jun 24, 2015

ok, so basic recursion is working… using this one/two/three folder structure can you send me a command which demonstrates it failing? Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recursive glob? - Unix & Linux Stack Exchange
Normally when you use ** , it works similar to * , but it's recurses all the directories recursively (like a loop). To...
Read more >
Why isn't my glob pattern recursing all folders?
This could be caused by various things, but one of the most common reasons that you might not see your globbing pattern recurse...
Read more >
Why can't ** be used (for recursive globbing) in a npm ...
So when it's performed by the npm it only counts files in dir0 and dir1 directories, interpreting **/*.js as in all 1 depth...
Read more >
recursive globbing: g`a/**/b` doesn't match a/b · Issue #4538 - GitHub
I can't tell if it was only intended to be used at the start of a glob rather than in the middle, which...
Read more >
Rdir: search recursive for files with a given name pattern
I am looking for a function that lists all files in all sub-directories according to a given search pattern. I can imagine that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found