aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorMats Rauhala <mats.rauhala@gmail.com>2011-05-04 23:52:01 +0200
committerMats Rauhala <mats.rauhala@gmail.com>2011-05-04 23:52:01 +0200
commitb29fee817d4b8b91165f40b5aa14590bc28b8375 (patch)
tree1eebc7b6acf2ee21bb01b5f622cf9e67ea2c8e12 /XMonad
parent2ea82bcaed3823593bb268e792f0f647cd4c82ea (diff)
downloadXMonadContrib-b29fee817d4b8b91165f40b5aa14590bc28b8375.tar.gz
XMonadContrib-b29fee817d4b8b91165f40b5aa14590bc28b8375.tar.xz
XMonadContrib-b29fee817d4b8b91165f40b5aa14590bc28b8375.zip
Action search autocomplete based on whole line
Ignore-this: 869cf6954be97ea05cbcf7457ab430b7 The previous version autocompleted based on words, but when searching from web sites, it makes more sense to autocomplete based on the entire search. darcs-hash:20110504215201-af521-b8d9ca7727b8ec3aa4593cd9c8caaa664e2c3af8.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Actions/Search.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/XMonad/Actions/Search.hs b/XMonad/Actions/Search.hs
index 98d2133..535edf3 100644
--- a/XMonad/Actions/Search.hs
+++ b/XMonad/Actions/Search.hs
@@ -61,7 +61,7 @@ import Data.Char (isAlphaNum, isAscii)
import Data.List (isPrefixOf)
import Text.Printf
import XMonad (X(), MonadIO, liftIO)
-import XMonad.Prompt (XPrompt(showXPrompt), mkXPrompt, XPConfig(), historyCompletionP)
+import XMonad.Prompt (XPrompt(showXPrompt, nextCompletion, commandToComplete), mkXPrompt, XPConfig(), historyCompletionP, getNextCompletion)
import XMonad.Prompt.Shell (getBrowser)
import XMonad.Util.Run (safeSpawn)
import XMonad.Util.XSelection (getSelection)
@@ -199,6 +199,8 @@ Happy searching! -}
data Search = Search Name
instance XPrompt Search where
showXPrompt (Search name)= "Search [" ++ name ++ "]: "
+ nextCompletion _ = getNextCompletion
+ commandToComplete _ c = c
-- | Escape the search string so search engines understand it. Only
-- digits and ASCII letters are not encoded. All non ASCII characters