-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
:open
should support globbing / wildcards
#5706
Comments
Should we have an upper recursive and directory limit that can be overridden? Imagine opening /**/*, or just a directory with one million files in it. |
The behavior in (n)vim seems to be:
Would we want the mirror that behavior? Seems generally OK to me. The alternative to #3 would be something like error out if no files match and provide a way to escape the glob pattern should you want to edit a file called "file*". |
I think that is a good algorithm. I can accept that. |
Hi I would like to try and implement this. Its my first time collaborating, so I was curious if it is allowed to use crates, I would try to implement this with the glob crate. |
I'm not sure we need globbing support. IMO this overlaps with the file picker and I would rather see multiple selections in the file-picker (#4837) than extending |
I can't see why this shouldn't be supported with :open, because this is one of those things where you would want to quickly point out what to open, and globbing is perfect for that. I do agree that pulling in another crate is not what we want. How should globbing be supported? Basic: ** for "all directories under parent" and * for all files in current? |
A manual implementation would be a waste of dev time and confusing for users in the best case because it won't meet every expectation. I think that we should use a well known implementation. |
Actually we recently added globs for file-types using Yeah on second thought I think this would be a reasonable improvement. This is right around where we should expand globs: helix/helix-term/src/commands/typed.rs Line 113 in 98ebeee
|
(We should be using globset and not the |
This is not closed 😅 The merged PR is just slightly related. BTW, |
You may be able to tell ignore directly to o ly whitelist paths that match a certain glob. If not you should implement an ignore filter that checks a globset glov. You should not be pulling any new libraries in or writing significant amounts of code |
I haven't found a bug report for this yet - sorry if I missed one!
I had just now wanted to open a whole range of files via
:open ~/path/to/prefix_*
.Helix created a new buffer with that name instead of expanding the
*
and opening all matching files. It would be real neat if globbing was supported!The text was updated successfully, but these errors were encountered: