From 8a9ee37469d02d9f7a78c7cdf5dcc84cfd727cd8 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Fri, 14 Dec 2007 17:31:19 +0100 Subject: Search.hs: fix shadowing warning and haddock errors darcs-hash:20071214163119-bd4d7-1307134ac9e109a8912985e25c060474c1722a52.gz --- XMonad/Util/Search.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'XMonad') diff --git a/XMonad/Util/Search.hs b/XMonad/Util/Search.hs index ec627ab..17b7e8c 100644 --- a/XMonad/Util/Search.hs +++ b/XMonad/Util/Search.hs @@ -48,7 +48,7 @@ escape = escapeURIString (\c -> isAlpha c || isDigit c || isMark c) -- | Given the base search URL, a browser to use, and the actual query, escape -- the query, prepend the base URL, and hand it off to the browser. search :: String -> FilePath -> String -> IO () -search site browser search = safeSpawn browser $ site ++ escape search +search site browser query = safeSpawn browser $ site ++ escape query promptSearch :: (String -> String -> IO ()) -> String -> XPConfig -> X () promptSearch engine browser config = mkXPrompt Search config (getShellCompl []) $ io . (engine browser) @@ -63,14 +63,16 @@ wikipediaSearch = search "https://secure.wikimedia.org/wikipedia/en/wiki/Special waybackSearch = search "http://web.archive.org/" -- | Search the particular site; these are suitable for binding to a key. Use them like this: +-- -- > , ((modm, xK_g ), google "firefox" defaultXPConfig) +-- -- First argument is the browser you want to use, the second the prompt configuration google, wayback, wikipedia :: String -> XPConfig -> X () google = promptSearch googleSearch wikipedia = promptSearch wikipediaSearch wayback = promptSearch waybackSearch --- | See previous. Like google/wikipedia, but one less argument - the query is +-- | See previous. Like google\/wikipedia, but one less argument - the query is -- extracted from the copy-paste buffer of X Windows. googleSelection, waybackSelection, wikipediaSelection :: String -> X () googleSelection browser = io $ googleSearch browser =<< getSelection -- cgit v1.2.3