[xmonad] Two patches related to XMonad.Prompt
Norbert Zeh
nzeh at cs.dal.ca
Sat Mar 14 16:58:57 UTC 2015
Hi folks,
I really got used to using emacs ido mode, which offers a pretty powerful
and intuitive fuzzy matching of completions, so I wanted to port the same
to XMonad.Prompt. This required two patches, included in the attached
patch bundles:
(1) Completions should be sortable by how well they match the current
query string. This turned out to be a very easy addition of a 'sorter'
function to XPConfig, which is parameterized by the current query string.
The default is 'const id', that is, no sorting is done, which is exactly
the old behaviour of XMonad.Prompt.
(2) A new module XMonad.Prompt.FuzzyMatch that implements the fuzzy
matching. The exact rules for matching and sorting of matches are
explained in its documentation.
As usual, let me know if anything needs to straightened out before these
patches can be applied.
Cheers,
Norbert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20150314/ea4e3fe0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xprompt-fuzzymatch.patch
Type: text/x-patch
Size: 58359 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20150314/ea4e3fe0/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xprompt-sorting.patch
Type: text/x-patch
Size: 54662 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20150314/ea4e3fe0/attachment-0003.bin>
More information about the xmonad
mailing list