Pre-checks
Describe your feature request
Say that I have Microsoft Teams and Steam running, when I search for teams, I'd like Microsoft Teams to show up before I finish typing the 5th character (the s of teams, my input) that would unequivocally match the Microsoft Teams result instead of Steam.
I believe that prioritising matches at word boundaries would be appropriate.
Note that currently, setting the match-mode to fzf doesn't replicate that specific behaviour of the default fzf matching algorithm. Here's a shell snippet you can play with to see for yourself:
fuzzel --match-mode fzf --dmenu <<EOF
Steam
Microsoft Teams
EOF
fuzzel --match-mode fzf --dmenu <<EOF
Microsoft Teams
Steam
EOF
Do similar tools already implement this feature?
Yes, fzf and tofi do it by default.
Here's two quick copy-pastable excerpts to observe how either behaves:
fzf <<EOF
Steam
Microsoft Teams
EOF
fzf <<EOF
Microsoft Teams
Steam
EOF
tofi --fuzzy true <<EOF
Steam
Microsoft Teams
EOF
tofi --fuzzy true <<EOF
Microsoft Teams
Steam
EOF
Regardless of the order in which the two results are listed originally, merely typing "tea" will favour Microsoft Teams right away with both tools.
Well, technically, I only tested the beginning of words rather than both their ends, but I suppose this to be the more prominent use case.
### Pre-checks
- [x] The [fuzzel.ini](https://codeberg.org/dnkl/fuzzel/src/branch/master/doc/fuzzel.ini.5.scd)
and [fuzzel](https://codeberg.org/dnkl/fuzzel/src/branch/master/doc/fuzzel.1.scd) man pages.
- [x] [Changelog](https://codeberg.org/dnkl/fuzzel/src/branch/master/CHANGELOG.md#unreleased)
of newer and unreleased features
### Describe your feature request
Say that I have `Microsoft Teams` and `Steam` running, when I search for `teams`, I'd like `Microsoft Teams` to show up before I finish typing the 5th character (the `s` of `teams`, my input) that would unequivocally match the `Microsoft Teams` result instead of `Steam`.
**I believe that prioritising matches at word boundaries would be appropriate.**
Note that currently, setting the `match-mode` to `fzf` doesn't replicate that specific behaviour of the default `fzf` matching algorithm. Here's a shell snippet you can play with to see for yourself:
```sh
fuzzel --match-mode fzf --dmenu <<EOF
Steam
Microsoft Teams
EOF
fuzzel --match-mode fzf --dmenu <<EOF
Microsoft Teams
Steam
EOF
```
### Do similar tools already implement this feature?
Yes, `fzf` and `tofi` do it by default.
Here's two quick copy-pastable excerpts to observe how either behaves:
```sh
fzf <<EOF
Steam
Microsoft Teams
EOF
fzf <<EOF
Microsoft Teams
Steam
EOF
```
```sh
tofi --fuzzy true <<EOF
Steam
Microsoft Teams
EOF
tofi --fuzzy true <<EOF
Microsoft Teams
Steam
EOF
```
Regardless of the order in which the two results are listed originally, merely typing "tea" will favour `Microsoft Teams` right away with both tools.
Well, technically, I only tested the *beginning* of words rather than both their ends, but I suppose this to be the more prominent use case.