diff options
author | Valery V. Vorotyntsev <valery.vv@gmail.com> | 2009-03-12 10:13:14 +0100 |
---|---|---|
committer | Valery V. Vorotyntsev <valery.vv@gmail.com> | 2009-03-12 10:13:14 +0100 |
commit | 9ac9536f1468d063731e01f522d570c5b91c1080 (patch) | |
tree | e0e84e0dac91e40bb2e478aa22736ebf02e007b8 /XMonad/Prompt | |
parent | d7677476b38b2cf51f1b3fb97f2c2f6aec759cbe (diff) | |
download | XMonadContrib-9ac9536f1468d063731e01f522d570c5b91c1080.tar.gz XMonadContrib-9ac9536f1468d063731e01f522d570c5b91c1080.tar.xz XMonadContrib-9ac9536f1468d063731e01f522d570c5b91c1080.zip |
Prompt.Shell: escape ampersand
Ignore-this: 7200b76af8109bab794157da46cb0030
Ampersand (&) is a special character and should be escaped.
darcs-hash:20090312091314-752c4-e16dcbdf05ea59db8b2e02d3157cd98ac2734d9b.gz
Diffstat (limited to 'XMonad/Prompt')
-rw-r--r-- | XMonad/Prompt/Shell.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/XMonad/Prompt/Shell.hs b/XMonad/Prompt/Shell.hs index d1ea150..4dc466a 100644 --- a/XMonad/Prompt/Shell.hs +++ b/XMonad/Prompt/Shell.hs @@ -118,13 +118,12 @@ split e l = escape :: String -> String escape [] = "" -escape (' ':xs) = "\\ " ++ escape xs escape (x:xs) | isSpecialChar x = '\\' : x : escape xs | otherwise = x : escape xs isSpecialChar :: Char -> Bool -isSpecialChar = flip elem "\\@\"'#?$*()[]{};" +isSpecialChar = flip elem " &\\@\"'#?$*()[]{};" -- | Ask the shell environment for env :: String -> String -> IO String |