Run.hs, SshPrompt.hs, ShellPrompt.hs: mv runInXTerm back into Run.hs per suggestions

This commit is contained in:
gwern0
2007-10-24 00:13:41 +00:00
parent 725b3a82ca
commit 877999d890
3 changed files with 8 additions and 8 deletions

View File

@@ -20,7 +20,6 @@ module XMonadContrib.ShellPrompt (
, split
, prompt
, safePrompt
, runInXTerm
) where
import System.Environment (getEnv)
@@ -76,12 +75,6 @@ safePrompt c config = mkXPrompt Shell config (getShellCompl [c]) run
unsafePrompt c config = mkXPrompt Shell config (getShellCompl [c]) run
where run a = unsafeSpawn $ c ++ " " ++ a
-- This may be better done as a specialization of 'prompt'
runInXTerm :: String -> X ()
runInXTerm com = do
c <- io $ catch (getEnv "XTERMCMD") (const $ return "xterm")
spawn ("exec " ++ c ++ " -e " ++ com)
getShellCompl :: [String] -> String -> IO [String]
getShellCompl cmds s | s == "" || last s == ' ' = return []
| otherwise = do