you can't navigate into some folders when they have similar names
Bug #675016 reported by
Paweł Bara
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cardapio |
Fix Released
|
Low
|
Unassigned |
Bug Description
My /usr folder contains four folders starting with "lib", namely:
lib64
libexec
lib
lib32
Let's say I want to get into /usr/lib. I enter "/usr/lib/" into the search entry and what happens...? I'm now in "/usr/lib64/"! That's because the elements are sorted like I showed earlier and Cardapio navigates into the first one on the list of similiar items.
This should work like this: if there is an exact match (like "/usr/lib" in our case), use it. Otherwise, just take the first element on the list.
Changed in cardapio: | |
importance: | Undecided → Low |
To post a comment you must log in.
Ok, I have partially fixed this by sorting the results alphabetically. This will fix most use cases, including the one you posted above. It also makes the results prettier :)
An example use case where this doesn't fix the bug is when you're searching for "lib" and the directory contains an entry called "alib". This would lead to results like:
alib
lib
lib32
zlib
Then, to peek into the lib folder, you'd need to press Tab, then Down, then slash / , as usual.
For now I think it's best to not try to solve the case above. Instead, the best solution would be to move from a simple filename search to an edit-distance based search. This means using something like the Levenshtein or difflib modules (http:// stackoverflow. com/questions/ 682367/ good-python- modules- for-fuzzy- string- comparison)