diff options
author | Valery V. Vorotyntsev <valery.vv@gmail.com> | 2007-10-22 21:20:37 +0200 |
---|---|---|
committer | Valery V. Vorotyntsev <valery.vv@gmail.com> | 2007-10-22 21:20:37 +0200 |
commit | 489084a420f7d7c22a3d9414e696b4c0976cf7bb (patch) | |
tree | 5587141a7fefb5d54a568efa1a8adb54e7a88996 /SshPrompt.hs | |
parent | aae9ed1fde80cec3b5c06193d56d1d82d0089430 (diff) | |
download | XMonadContrib-489084a420f7d7c22a3d9414e696b4c0976cf7bb.tar.gz XMonadContrib-489084a420f7d7c22a3d9414e696b4c0976cf7bb.tar.xz XMonadContrib-489084a420f7d7c22a3d9414e696b4c0976cf7bb.zip |
SshPrompt.hs (showXPrompt): use a single blank
Delete trailing whitespace. Fix documentation typo.
darcs-hash:20071022192037-ae588-44d4643810894b53af8170d474ea00c2ddbff10a.gz
Diffstat (limited to 'SshPrompt.hs')
-rw-r--r-- | SshPrompt.hs | 10 |
1 files changed, 5 insertions, 5 deletions
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") |