From aae9ed1fde80cec3b5c06193d56d1d82d0089430 Mon Sep 17 00:00:00 2001 From: "Valery V. Vorotyntsev" Date: Wed, 24 Oct 2007 16:38:20 +0200 Subject: ShellPrompt.hs: move `uniqSort' to XPrompt.hs darcs-hash:20071024143820-ae588-df2714f8e495275cafc2514e3cf4aabc886b36d4.gz --- ShellPrompt.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ShellPrompt.hs b/ShellPrompt.hs index f89c1c4..0692244 100644 --- a/ShellPrompt.hs +++ b/ShellPrompt.hs @@ -25,7 +25,6 @@ module XMonadContrib.ShellPrompt ( import System.Environment import Control.Monad import Data.List -import Data.Set (toList, fromList) import System.Directory import System.IO import XMonadContrib.Run @@ -79,9 +78,6 @@ getShellCompl cmds s | s == "" || last s == ' ' = return [] f <- fmap lines $ runProcessWithInput "/bin/bash" [] ("compgen -A file " ++ s ++ "\n") return . map escape . uniqSort $ f ++ commandCompletionFunction cmds s -uniqSort :: Ord a => [a] -> [a] -uniqSort = toList . fromList - commandCompletionFunction :: [String] -> String -> [String] commandCompletionFunction cmds str | '/' `elem` str = [] | otherwise = filter (isPrefixOf str) cmds -- cgit v1.2.3