From 574eff0df1aff9bdc6d32939a03312cc08803de3 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Mon, 17 Apr 2023 23:43:05 +0100 Subject: Add --matching-algorithm option. This replaces the --fuzzy-match algorithm. Available choices are normal, prefix and fuzzy. Levenshtein distance was investigated, but it seems pretty rubbish for tofi's use case, where you normally want a good match when you've only typed a small portion of the target string. --- doc/tofi.5.scd | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc/tofi.5.scd') diff --git a/doc/tofi.5.scd b/doc/tofi.5.scd index 29547e0..013dc57 100644 --- a/doc/tofi.5.scd +++ b/doc/tofi.5.scd @@ -61,8 +61,21 @@ options. - tofi-run: _$XDG_STATE_HOME/tofi-history_ - tofi-drun: _$XDG_STATE_HOME/tofi-drun-history_ +*matching-algorithm*=_normal|prefix|fuzzy_ + Select the matching algorithm used. + If _normal_, substring matching is used, weighted to favour matches + closer to the beginning of the string. + If _prefix_, only substrings at the beginning of the string are matched. + If _fuzzy_, searching is performed via a simple fuzzy matching + algorithm. + + Default: normal *fuzzy-match*=_true|false_ + *WARNING*: This option is deprecated, and may be removed in a future + version of tofi. You should use the *matching-algorithm* + option instead. + If true, searching is performed via a simple fuzzy matching algorithm. If false, substring matching is used, weighted to favour matches closer to the beginning of the string. -- cgit v1.2.3