diff options
author | gwern0 <gwern0@gmail.com> | 2008-10-08 22:51:31 +0200 |
---|---|---|
committer | gwern0 <gwern0@gmail.com> | 2008-10-08 22:51:31 +0200 |
commit | 98583c26d8d48dbbc6da7e2302012180053134e5 (patch) | |
tree | 5ce7b50937fe18898697d1f61b237bcf7820fa3e /XMonad | |
parent | 47b48253030912c36cf77bc5179e6e5fdcc152c3 (diff) | |
download | XMonadContrib-98583c26d8d48dbbc6da7e2302012180053134e5.tar.gz XMonadContrib-98583c26d8d48dbbc6da7e2302012180053134e5.tar.xz XMonadContrib-98583c26d8d48dbbc6da7e2302012180053134e5.zip |
Prompt.hs rename deleteConsecutiveDuplicates
That name is really unwieldy and long.
darcs-hash:20081008205131-f7719-4dad571b407c09c06f19315d4133f8117040dc20.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Prompt.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs index c01e3cb..62d554a 100644 --- a/XMonad/Prompt.hs +++ b/XMonad/Prompt.hs @@ -46,7 +46,7 @@ module XMonad.Prompt , historyCompletion -- * History filters , deleteAllDuplicates - , deleteConsecutiveDuplicates + , deleteConsecutive ) where import Prelude hiding (catch) @@ -811,7 +811,7 @@ breakAtSpace s -- 'getShellCompl'; you pass it to mkXPrompt, and it will make completions work -- from the query history stored in ~\/.xmonad\/history. historyCompletion :: ComplFunction -historyCompletion x = fmap (deleteConsecutiveDuplicates . filter (isInfixOf x) . Map.fold (++) []) readHistory +historyCompletion x = fmap (deleteConsecutive . filter (isInfixOf x) . Map.fold (++) []) readHistory -- | Sort a list and remove duplicates. Like 'deleteAllDuplicates', but trades off -- laziness and stability for efficiency. @@ -820,8 +820,8 @@ uniqSort = toList . fromList -- | Functions to be used with the 'historyFilter' setting. -- 'deleteAllDuplicates' will remove all duplicate entries. --- 'deleteConsecutiveDuplicates' will only remove duplicate elements +-- 'deleteConsecutive' will only remove duplicate elements -- immediately next to each other. -deleteAllDuplicates, deleteConsecutiveDuplicates :: [String] -> [String] +deleteAllDuplicates, deleteConsecutive :: [String] -> [String] deleteAllDuplicates = nub -deleteConsecutiveDuplicates = map head . group +deleteConsecutive = map head . group |