Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate field for folder in file search #80564

Closed
SebastianZ opened this issue Sep 9, 2019 · 5 comments
Closed

Separate field for folder in file search #80564

SebastianZ opened this issue Sep 9, 2019 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality search Search widget and operation issues

Comments

@SebastianZ
Copy link

SebastianZ commented Sep 9, 2019

Issue Type: Feature Request

The global search should have a separate field for the folder(s) to search in. That makes it possible to independently specify the files to search for and by that simplifies the UI.

Use case: I want to search for files with specific extensions in several different folders. To do so I currently have to write something like this:

/path/to/folder1/*.foo, /path/to/folder1/*.bar, /path/to/folder2/*.foo, /path/to/folder2/*.bar, /path/to/folder3/*.foo, /path/to/folder3/*.bar

With this feature, I'd enter "*.foo, *.bar" in the files field and "/path/to/folder1/, /path/to/folder2/, /path/to/folder3/" in the folders field.

Sebastian

VS Code version: Code 1.38.0 (3db7e09, 2019-09-03T21:49:13.459Z)
OS version: Windows_NT x64 10.0.18362

@roblourens roblourens added feature-request Request for new features or functionality search Search widget and operation issues labels Sep 10, 2019
@roblourens roblourens added this to the Backlog Candidates milestone Oct 27, 2019
@vscodebot
Copy link

vscodebot bot commented Jan 15, 2020

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@SebastianZ SebastianZ changed the title Separate field for folder Separate field for folder in file search Feb 4, 2020
@SebastianZ
Copy link
Author

A use case that would also be solved by having separated fields, which currently doesn't seem to be possible:

Search by file names in different folders recursively.
Say, I want to search in two different directories including all their subdirectories within specific files, then this seems currently not to be possible.

So, taking the example above, "*.foo, *.bar" in the files field and "/path/to/folder1/, /path/to/folder2/, /path/to/folder3/" in the folders field would ideally differ from the current /path/to/folder1/*.foo, /path/to/folder1/*.bar, /path/to/folder2/*.foo, /path/to/folder2/*.bar, /path/to/folder3/*.foo, /path/to/folder3/*.bar in that files would also be searched in subdirectories of folder1, folder2, and folder3.

I've just created a question on Stack Overflow at https://stackoverflow.com/q/60053690/432681 asking whether that's actually possible with the current implementation.

Sebastian

@ArturoDent
Copy link

ArturoDent commented Feb 7, 2020

See my comment/answer on SO about using a globstar so that

/path/to/folder1/**/*.foo, /path/to/folder1/**/*.bar etc. would search in all subdirectories of the folder1 to whatever depth within files with either the foo or bar extension. Seems to work in my testing. If I am correct that is what you are trying to accomplish.

https://github.com/isaacs/node-glob#glob-primer

** If a "globstar" is alone in a path portion, then it matches zero or more directories and subdirectories searching for matches. It does not crawl symlinked directories.

@vscodebot
Copy link

vscodebot bot commented Mar 6, 2020

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding

@vscodebot
Copy link

vscodebot bot commented Mar 16, 2020

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Mar 16, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality search Search widget and operation issues
Projects
None yet
Development

No branches or pull requests

3 participants