Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Exact path matching command line option#980

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
SeeStarz wants to merge1 commit intoajeetdsouza:main
base:main
Choose a base branch
Loading
fromSeeStarz:exact-match

Conversation

@SeeStarz
Copy link

Proof of concept feature improvement related to#260

This adds a new option to allow exact matching of sub path (the ones in between slashes). e.g.zoxide query rust matchesrust but notrust-analyzer. However I haven't been able to understand how to integrate this option into CLI options, as such this pull request isn't complete yet.

I personally think just being able to exact match directories would help with QoL especially since the ones most vulnerable to regex matching is short names anyways.

Any feedback would be welcome!

@SeeStarzSeeStarz changed the titleStream filter logicStream filter by exact sub pathFeb 8, 2025
@SeeStarz
Copy link
Author

Now that it comes to shell integration I don't think I am qualified to progress any further, I do hope this will be somewhat useful if anyone has similar ideas.

The added feature is-e or--exact flag onzoxide query

@oriongonza
Copy link

Your git history is whack since you merged instead of rebasing

@SeeStarz
Copy link
Author

I completely missed that, thanks!
I'm not sure where I f'd up but nothing a good old force push can't solve.
Note: If anyone has seen my PR before, both commits are merged into one forming a complete feature (albeit missing shell integration)

@SeeStarzSeeStarz marked this pull request as ready for reviewFebruary 17, 2025 12:47
@SeeStarzSeeStarz changed the titleStream filter by exact sub pathExact path matching command line optionFeb 17, 2025
#[clap(long, value_hint =ValueHint::DirPath, value_name ="path")]
pubexclude:Option<String>,

/// Only match exact

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'd spend a bit more time explaining this feature. This is what will show up in--help

});

ifletSome(idx) = idx{
components = components.drain(0..idx).collect();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This... is convoluted to say the least.

@SeeStarz
Copy link
Author

SeeStarz commentedSep 11, 2025
edited
Loading

Hi it's been a while, average random guy making a PR am i right. Also thanks for reading my PR and reviewing it, and sorry it took so long to reply.

Anyways the best feature explanation i came up with while being consistent with others is/// Only match path components exactly (e.g. bin != sbin) It's really hard to convey thatbin matches/usr/bin and/bin but not/sbin or similar.

Upon reconsideration, it's apparent that my implementation doesn't play nicely with any queries with/ in it. Meanwhile testcases suggests that slashes are part of the feature. So it seems like if the intention is to match/usr/bin but not/usr/sbin one solution is to simply match for/bin. However the problem shifts to filtering out/usr/binn or any other forms of suffix.

For this reason i'm changing this PR back to draft.

My personal interpretation concludes that the easiest way to do so is modifyingfilter_by_keywords directly to account for the--exact option, but I'm not sure if I have the time to understand how this function works in full picture to not mess things up.

@SeeStarzSeeStarz marked this pull request as draftSeptember 11, 2025 13:26
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@oriongonzaoriongonzaoriongonza left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@SeeStarz@oriongonza

[8]ページ先頭

©2009-2025 Movatter.jp