helix
helix copied to clipboard
Globbing support in `:open`
Closes https://github.com/helix-editor/helix/issues/5706
The functionality is almost done, but I would like to have feedback on how to improve the error handling.
Please tell me if you prefer moving the two inner functions to somewhere else.
Things to discuss:
- ~Should I ignore directories when globbing? Currently, running something like
:open *opens all files in the current directory and multiple file pickers for all directories in the current directory.~ Update: I ignore directories when globbing now. - We probably should set an upper limit of paths to open. How should this limit be set? Should it be configurable or just a constant? Currently, it is a constant set to 32.
- Should I add tests for the globing functionality? If yes, where?
Great functionality, testing here and works good!
I added an upper limit of files to open with a glob and implemented ignoring directories when globbing. The PR is ready to be merged after a review 😃
Currently this breaks opening non-existent file, e.g. :o file_which_doesnt_exist.txt.
@postsolar You are right. I will fix it in the next days.
Fixed opening non-existent files and merge conflicts.
I was too focused on skipping non-relevant parents 😅 I just use the parallel ignore walker now. Ready for a review :)