[xmonad] Issue 393 in xmonad: XMonad.Prompt.Shell should use user-defined searchPredicate

codesite-noreply at google.com codesite-noreply at google.com
Sat Feb 2 17:01:30 CET 2013

Comment #5 on issue 393 by dunric... at gmail.com: XMonad.Prompt.Shell should  
use user-defined searchPredicate


me again. As a search predicate for shellPrompt is still not implemented in  
an upstream, here is the updated patch to xmonad-contrib 0.11 sources.

In addition to the previous version it sorts list of the possible commands  
not only alphabetically but also favours commands starting with the same  
sequence as typed in prompt. Similar behaviour seen at dmenu launcher.
For example my search predicate for XMonad.Prompt.Shell.shellPrompt matches  
anywhere inside of possible command names, not only at their begining and  
ignoring case at the same time:
     searchPredicate = L.isInfixOf . map toLower

Now when trying to launch a firefox browser and type "fire" at xmonad's  
shellPrompt I'm getting the following completions in that order:
firefox aafire cacafire

	shell-compl_predicate.patch  5.1 KB

More information about the xmonad mailing list