vim-projectionist icon indicating copy to clipboard operation
vim-projectionist copied to clipboard

Broken globbing when directories have/do not have subdirectories

Open p0deje opened this issue 10 years ago • 2 comments

I have the following configuration:

{  
  "features/support/lib/pages/**/regions/*_region.rb": {"type": "region"}
}

And the directory/file structure:

├── platform
│   ├── regions
│   │   ├── activity
│   │   │   └── activity_region.rb
│   │   ├── jobs
│   │   │   ├── assign_developer_region.rb
│   │   │   ├── candidates_region.rb
│   │   │   ├── # etc in subdirectories
├── public
│   ├── regions
│   │   ├── authors_region.rb
│   │   ├── blog_subscribe_region.rb
│   │   ├── # etc with no subdirectories

Projections for region type are populated only from public/ directory. Docs say nothing about this case so I'm not sure how to configure it to include files from both platform/ and public/ dirs.

p0deje avatar Dec 22 '14 09:12 p0deje

The issue is the platform directory has an extra level of nesting under regions, which is not supported by *. If these are the only two paths you care about, you could just add features/support/lib/pages/platform/regions/*_region.rb and features/support/lib/pages/public/regions/*_region.rb as separate paths.

tpope avatar Dec 22 '14 16:12 tpope

But in this case I'm going to miss platform/public part in the list.

I think there should be some way to achieve the desired behavior. I can try to add it if you can tell me where to look at and how projection should look like.

p0deje avatar Dec 22 '14 17:12 p0deje