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

Globbing support in :open #9723

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Globbing support in :open #9723

wants to merge 18 commits into from

Conversation

mo8it
Copy link
Contributor

@mo8it mo8it commented Feb 25, 2024

Closes #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?

@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. A-command Area: Commands labels Feb 25, 2024
@daedroza
Copy link
Contributor

Great functionality, testing here and works good!

@mo8it
Copy link
Contributor Author

mo8it commented Feb 29, 2024

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 😃

@archseer archseer added this to the next milestone Mar 4, 2024
@postsolar
Copy link
Contributor

Currently this breaks opening non-existent file, e.g. :o file_which_doesnt_exist.txt.

@mo8it
Copy link
Contributor Author

mo8it commented Mar 11, 2024

@postsolar You are right. I will fix it in the next days.

@mo8it
Copy link
Contributor Author

mo8it commented Mar 23, 2024

Fixed opening non-existent files and merge conflicts.

helix-term/src/commands/typed.rs Outdated Show resolved Hide resolved
helix-term/src/commands/typed.rs Outdated Show resolved Hide resolved
helix-term/src/commands/typed.rs Outdated Show resolved Hide resolved
helix-term/src/commands/typed.rs Outdated Show resolved Hide resolved
@the-mikedavis the-mikedavis added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from a maintainer. labels Apr 9, 2024
@mo8it mo8it requested a review from pascalkuthe May 10, 2024 00:21
@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 10, 2024
@mo8it
Copy link
Contributor Author

mo8it commented May 10, 2024

I was too focused on skipping non-relevant parents 😅 I just use the parallel ignore walker now. Ready for a review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-command Area: Commands S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

:open should support globbing / wildcards
6 participants