In my case let’s say I have a specific extension .new
and I want a context menu item to appear only in folders containsing files with that extension, how can I do it?
/folderA
/folderB <--- context menu should appear here
/cool.new
I’ve tried with regex but VScode is not happy
"explorer/context": [
{
"command": "extensionName/my-command",
"when": "resourceFilename =~ /.+/.+\.new$/"
}
]