index.md (1294B)
1 # typo 2 3 ## Description 4 5 Typo-tolerant matching for dmenu. 6 7 Every word of the input also matches ignoring diacritics, so `cafe` finds 8 `café` and `елка` finds `ёлка`. When the input is a single word, items 9 that contain it with up to one or two errors are listed after the exact, 10 prefix and substring matches, fewest errors first. 11 12 An error is an inserted, deleted or substituted character, or two adjacent 13 characters swapped (restricted Damerau-Levenshtein distance), so `frefox`, 14 `firefxo` and `fierfox` all find `firefox`. The input is compared with any 15 part of an item, character by character in UTF-8. 16 17 ## Notes 18 19 - One error is allowed from 5 input characters, two from 8: set 20 `typo_min_len_1` and `typo_min_len_2` in `config.h` (0 disables). 21 - Case follows dmenu's `-i` switch; diacritics are always ignored. 22 - Unlike [fuzzymatch](../fuzzymatch/), which forgives only missing letters, 23 this patch also forgives extra, wrong and swapped letters, and keeps the 24 usual order of exact matches. 25 - The patch adds `typo.h`, a single-header implementation that can be 26 reused elsewhere. Upstream, with rofi modes using the same matching: 27 <https://github.com/mbutov/menu-typo> 28 29 ## Download 30 31 - [dmenu-typo-5.4.diff](dmenu-typo-5.4.diff) 32 33 ## Authors 34 35 - Maxim Butov - <mbutov@gmail.com>