mark icon indicating copy to clipboard operation
mark copied to clipboard

Support double star (**) glob syntax

Open SleepWalker opened this issue 3 years ago • 1 comments

Hello,

it turns out that default golang Glob function does not support common globstar (**) syntax. This syntax allows matching of files in subdirs too.

Here are some useful links:

  • https://stackoverflow.com/questions/26809484/how-to-use-double-star-glob-in-go
  • https://github.com/bmatcuk/doublestar

SleepWalker avatar Aug 10 '21 16:08 SleepWalker

I've got this file structure:

root@903a83c00b08:/app/docs# tree
.
|-- docs
     |-- foo.md
     |-- bar.md
     |-- baz
         |-- qux.md

I ran with the file globbing pattern of -f "docs/**/*.md" in the base folder and it only found qux.md.

So it seems that this tool does support the ** syntax but that it won't find files in the docs folder, but only subdirs of of docs, but probably not subdirds of those subdirs 😄

harvzor avatar Feb 11 '22 16:02 harvzor

I've created #392 to fix this. anyone still interested in it?

oradwell avatar Nov 29 '23 17:11 oradwell