diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2011-11-18 19:47:45 +0100 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2011-11-18 19:47:45 +0100 |
commit | 1187eaf3b7e63523b7ad9bd287038baef3bedfa9 (patch) | |
tree | 8989ef70b1ee84a77c1e1de5ace8fc006a355bfb /XMonad/Prompt | |
parent | 1b3327dc7cd7f87aa8dee335889fde734a8ac48b (diff) | |
download | XMonadContrib-1187eaf3b7e63523b7ad9bd287038baef3bedfa9.tar.gz XMonadContrib-1187eaf3b7e63523b7ad9bd287038baef3bedfa9.tar.xz XMonadContrib-1187eaf3b7e63523b7ad9bd287038baef3bedfa9.zip |
Be consistent with core utf8-string usage.
Ignore-this: 9de0599d0fb888c58e11598d4de9599e
Now that spawn assumes executeFile takes a String containing utf8 codepoints
(and takes an actual String as input) adjust Prompt.Shell to avoid double
encoding. U.Run functions are updated to be consistent with spawn.
darcs-hash:20111118184745-1499c-0f5bee188cc9540d2747db1adbf87619011a5443.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Prompt/Shell.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/XMonad/Prompt/Shell.hs b/XMonad/Prompt/Shell.hs index da55f48..8dd151c 100644 --- a/XMonad/Prompt/Shell.hs +++ b/XMonad/Prompt/Shell.hs @@ -62,7 +62,7 @@ instance XPrompt Shell where shellPrompt :: XPConfig -> X () shellPrompt c = do cmds <- io getCommands - mkXPrompt Shell c (getShellCompl cmds) (spawn . encodeString) + mkXPrompt Shell c (getShellCompl cmds) spawn {- | See safe and unsafeSpawn. prompt is an alias for safePrompt; safePrompt and unsafePrompt work on the same principles, but will use @@ -81,9 +81,9 @@ shellPrompt c = do prompt, unsafePrompt, safePrompt :: FilePath -> XPConfig -> X () prompt = unsafePrompt safePrompt c config = mkXPrompt Shell config (getShellCompl [c]) run - where run = safeSpawn c . return . encodeString + where run = safeSpawn c . return unsafePrompt c config = mkXPrompt Shell config (getShellCompl [c]) run - where run a = unsafeSpawn $ c ++ " " ++ encodeString a + where run a = unsafeSpawn $ c ++ " " ++ a getShellCompl :: [String] -> String -> IO [String] getShellCompl cmds s | s == "" || last s == ' ' = return [] |