diff options
author | Phil Jones <philj56@gmail.com> | 2023-04-17 23:43:05 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2023-04-17 23:43:05 +0100 |
commit | 574eff0df1aff9bdc6d32939a03312cc08803de3 (patch) | |
tree | 5aeca72f70314bee3bf95db99f10d89f0a7b4032 /src/main.c | |
parent | 71a4801d20d8904cfcfa5e92c96d53ee06a2c69f (diff) |
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.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -834,7 +834,6 @@ static void usage(bool err) " --output <name> Name of output to display window on.\n" " --anchor <position> Location on screen to anchor window.\n" " --horizontal <true|false> List results horizontally.\n" -" --fuzzy-match <true|false> Use fuzzy matching for searching.\n" "\n" "All options listed in \"man 5 tofi\" are also accpted in the form \"--key=value\".\n" ); @@ -912,6 +911,7 @@ const struct option long_options[] = { {"history", required_argument, NULL, 0}, {"history-file", required_argument, NULL, 0}, {"fuzzy-match", required_argument, NULL, 0}, + {"matching-algorithm", required_argument, NULL, 0}, {"require-match", required_argument, NULL, 0}, {"auto-accept-single", required_argument, NULL, 0}, {"hide-input", required_argument, NULL, 0}, |