module Manatee.Plugin.Anything.AnythingInteractiveChar where
import DBus.Client hiding (Signal)
import Manatee.Plugin.Anything.Anything
import Manatee.Plugin.Anything.AnythingInteractive
import Manatee.Plugin.Anything.Types
anythingInteractiveChar :: Anything
anythingInteractiveChar =
Anything {anythingColumnTitle = ["InteractiveChar"]
,anythingColumnFun = [anythingCandidateUnpack]
,anythingSearch = AnythingSearch anythingInteractiveCharSearch
,anythingFilterRule = anythingFuzzyFilterRule True
,anythingCompletionRule = id
,anythingInputDepend = False
,anythingCommandFun = anythingInteractiveCharCommandFun
,anythingCalculateDelay = 0
}
anythingInteractiveCharSearch :: AnythingInput -> Client -> IO [String]
anythingInteractiveCharSearch input _
| null input
= return []
| otherwise
= return [[head input]]
anythingInteractiveCharCommandFun :: AnythingCommandFun
anythingInteractiveCharCommandFun input _ iType
= return [("Return Char", anythingInteractiveActionReturn iType [head input])]