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

Feature Request: sepparate glob option for filter command #1649

Closed
Catalyn45 opened this issue Mar 18, 2024 · 1 comment · Fixed by #1650
Closed

Feature Request: sepparate glob option for filter command #1649

Catalyn45 opened this issue Mar 18, 2024 · 1 comment · Fixed by #1650

Comments

@Catalyn45
Copy link
Contributor

Catalyn45 commented Mar 18, 2024

Hello,

I saw that currently the globsearch option is used to allow patterns (like *) both in search and filter commands.

My general usecase is: when I search for a directory/file, usually I do it by the first or last letters from it's name but when I'm using the filter command usually I want to use patterns, ex: *.go.

If I enable the globsearch then I can't quickly search for a file, because I always need to use * as suffix or prefix or both, and if I let it disabled then I can't use patterns in filter command to filter only files for a specific extension.

I was wondering if it's feasible to have a separate option, let's say globfilter which will be only for the filter command, and if there are people who finds this useful.

I guess a workaround could be to create custom commands which will dynamically set and unset globsearch before search and filter but then if I first filter, then I want to search on the filtered results it will reset.

@joelim-work
Copy link
Collaborator

joelim-work commented Mar 19, 2024

I can't think of a good solution either since globsearch is used in in dir.sort to selectively display the files matching the filter, which means it has to be enabled for the entire duration for which the filter is applied.

Considering that there are separate options for incremental updates (incfilter and incsearch), I think it would make sense to have separate options for globs too. Your suggestion of adding globfilter sounds reasonable to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants