Skip to content

The search string should be used in determining the score #260

@lefth

Description

@lefth

Right now, the frequency of use determines which directory is chosen when there are multiple matches. I suggest the closeness of the match should also be used, and that should take precedence over the frequency score.

Why? Because the user can control zoxide's behavior by typing a more specific name. Also because it's very unexpected when I type z Cat and zoxide takes me to "duplicates". It's unintuitive that the search string is used to filter results but not to select a result.

I suggest directories should be ranked based on how good a match they are with the search term, and the frequency score can be used to break ties. Or the frequency score could be incorporated with a lower weight: total score = match quality * 0.8 + frequency score * 0.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureRequest for a new feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions