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

refactor: add tests for Pattern::match_path #1837

Merged
merged 3 commits into from
Oct 26, 2024
Merged

refactor: add tests for Pattern::match_path #1837

merged 3 commits into from
Oct 26, 2024

Conversation

sxyazi
Copy link
Owner

@sxyazi sxyazi commented Oct 26, 2024

No description provided.

@sxyazi sxyazi merged commit 96bcd82 into main Oct 26, 2024
6 checks passed
@sxyazi sxyazi deleted the pr-73c9caf4 branch October 26, 2024 00:53
boydaihungst added a commit to boydaihungst/simple-mtpfs.yazi that referenced this pull request Nov 1, 2024
@boydaihungst
Copy link
Contributor

This PR breaks some previewer and preloader, fetcher rules. Maybe the theme > [filetype] as well.
Before we can use { name = "/mnt/*", run = "noop" } to disable preview and preloader for all files under /mnt folder, no matter how deep it's.
But for now we can only use { name = "/mnt/**/*", run = "noop" }.
So maybe you should add a breaking change when v0.4 is released.

@sxyazi
Copy link
Owner Author

sxyazi commented Nov 1, 2024

I'm surprised this would break some existing rules - if you want to match directories deeper than one level, you should always use **, and the doc has stated this: https://yazi-rs.github.io/docs/configuration/theme#icon

This PR fixes a bug where * and ** were behaving the same way — * should only be used for single-level depth, while ** should be used for multi-level depth (as in your case).

@boydaihungst
Copy link
Contributor

That's true. Thanks for explaining. 😉

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants