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

codesite-noreply at google.com codesite-noreply at google.com
Wed Feb 1 20:53:03 CET 2012


Comment #2 on issue 393 by dunric... at gmail.com: XMonad.Prompt.Shell should  
use user-defined searchPredicate
http://code.google.com/p/xmonad/issues/detail?id=393

Hi,

I just fixed (at least for me) the issue shellPrompt ignores  
searchPredicate field of XPConfig record.
After applying my patch, you can now create/combine whatever function you  
want and it will by used at filtering of shell commands completion.

Just set searchPredicate field and pass it to shellPrompt.
Of my xmonad.hs config:
import qualified Data.List as L
import Data.Char
...
    , ((myModMask, xK_x),     shellPrompt defaultXPConfig
                     {
                       -- match a substring anywhere within and ignore case
                       searchPredicate = L.isInfixOf . (map toLower)
                       ...
                     }

Patch created for xmonad-contrib ver. 0.10

Take care

:-)


Attachments:
	shell-compl_predicate.patch  4.4 KB




More information about the xmonad mailing list