summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/System/Environment.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar/System/Environment.hs')
-rw-r--r--src/Xmobar/System/Environment.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Xmobar/System/Environment.hs b/src/Xmobar/System/Environment.hs
index 42483ca..0491bcc 100644
--- a/src/Xmobar/System/Environment.hs
+++ b/src/Xmobar/System/Environment.hs
@@ -36,12 +36,13 @@ expandEnv (c:s) = case c of
False -> do
remainder <- expandEnv $ drop 1 s
return $ escString s ++ remainder
- where escString s' = let (cc:_) = s' in
+ where escString (cc:_) =
case cc of
't' -> "\t"
'n' -> "\n"
'$' -> "$"
_ -> [cc]
+ escString [] = ""
_ -> do
remainder <- expandEnv s