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

Fix duplicate matches #646

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rico-chet
Copy link

Fixes #348, also addressing a couple warnings I stumbled upon.

@rico-chet rico-chet force-pushed the fix-duplicate-matches-with-legacy-py branch from 17f3295 to 6303abf Compare January 24, 2022 11:40
@rico-chet rico-chet mentioned this pull request Jan 24, 2022
@CharlesARoy
Copy link

@wting can you approve this PR? The duplicate results are the only thing keeping me from switching back from Zoxide.

The order of completion suggestions must be according to the weights,
yet `set` is unordered. Thus, sorting needs to be performed after
de-duplicating.

Fixes wting#348
@rico-chet rico-chet force-pushed the fix-duplicate-matches-with-legacy-py branch from 6303abf to 54e5cb0 Compare February 8, 2022 20:12
@rico-chet
Copy link
Author

The first version had an issue that the results weren't sorted and thus one would typically jump to a random directory instead of the chosen one.
The new push fixes the issue by sorting the set.

@rico-chet
Copy link
Author

autojump is a PITA to work on, for the test coverage is quite poor :-(. The change breaks jc functionality, please don't merge. Will have to add jc regression test first and fix it.

@rico-chet rico-chet marked this pull request as draft March 30, 2022 11:54
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 this pull request may close these issues.

Bash completion has duplicate entries
2 participants