Skip to content

Frustratingly chooses the wrong directory when I make minor typos #131

@ElijahSink

Description

@ElijahSink

I've encountered this issue for a while, where autojump will choose the wrong directory from the database when I make a minor typo. It seems like the fuzzy matching algorithm is a little off.

Here's a case where I've encountered this:

> j facbeook-worker # I meant to say facebook-worker
[redacted]/facebook 

# I wanted the facebook-worker directory

The relevant weights from my database:

34.6:   [redacted]/facebook-worker
...
57.5:   [redacted]/facebook

Could you explain why autojump chooses the latter directory even though it has a much further Levenshtein difference from my input?

Difference between facbeook-worker and facebook-worker: 2
Difference between facbeook-worker and facebook: 8

I suppose that I'm basically complaining about the choice of Jaro-Winkler over Levenshtein or Damerau–Levenshtein which are also implemented as a part of strsim-rs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions