From 489084a420f7d7c22a3d9414e696b4c0976cf7bb Mon Sep 17 00:00:00 2001 From: "Valery V. Vorotyntsev" Date: Mon, 22 Oct 2007 21:20:37 +0200 Subject: SshPrompt.hs (showXPrompt): use a single blank Delete trailing whitespace. Fix documentation typo. darcs-hash:20071022192037-ae588-44d4643810894b53af8170d474ea00c2ddbff10a.gz --- SshPrompt.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'SshPrompt.hs') diff --git a/SshPrompt.hs b/SshPrompt.hs index 023bf96..05345ec 100644 --- a/SshPrompt.hs +++ b/SshPrompt.hs @@ -3,7 +3,7 @@ -- Module : XMonadContrib.SshPrompt -- Copyright : (C) 2007 Andrea Rossato -- License : BSD3 --- +-- -- Maintainer : andrea.rossato@unibz.it -- Stability : unstable -- Portability : unportable @@ -35,7 +35,7 @@ import XMonadContrib.XPrompt (XPrompt(..), XPConfig, mkXPrompt, -- > import XMonadContrib.XPrompt -- > import XMonadContrib.SshPrompt -- --- 3. In your keybindings add something like: +-- 2. In your keybindings add something like: -- -- > , ((modMask .|. controlMask, xK_s), sshPrompt defaultXPConfig) -- @@ -47,7 +47,7 @@ import XMonadContrib.XPrompt (XPrompt(..), XPConfig, mkXPrompt, data Ssh = Ssh instance XPrompt Ssh where - showXPrompt Ssh = "SSH to: " + showXPrompt Ssh = "SSH to: " sshPrompt :: XPConfig -> X () sshPrompt c = do @@ -58,13 +58,13 @@ ssh :: String -> X () ssh s = runInTerm ("ssh " ++ s) sshComplList :: IO [String] -sshComplList = (sort . toList . fromList) `fmap` liftM2 (++) sshComplListLocal sshComplListGlobal +sshComplList = (nub . sort) `fmap` liftM2 (++) sshComplListLocal sshComplListGlobal sshComplListLocal :: IO [String] sshComplListLocal = do h <- getEnv "HOME" sshComplListFile $ h ++ "/.ssh/known_hosts" - + sshComplListGlobal :: IO [String] sshComplListGlobal = do env <- getEnv "SSH_KNOWN_HOSTS" `catch` (\_ -> return "/nonexistent") -- cgit v1.2.3