aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgwern0 <gwern0@gmail.com>2011-11-28 00:15:07 +0100
committergwern0 <gwern0@gmail.com>2011-11-28 00:15:07 +0100
commitbfad1779b3389f8e79e2097298c419ec63b6d43d (patch)
tree8ed767152189b6da1b0545b6546409e52a242141
parent0be3b28dc39e933975389d755b54577d5fac9baf (diff)
downloadXMonadContrib-bfad1779b3389f8e79e2097298c419ec63b6d43d.tar.gz
XMonadContrib-bfad1779b3389f8e79e2097298c419ec63b6d43d.tar.xz
XMonadContrib-bfad1779b3389f8e79e2097298c419ec63b6d43d.zip
XMonad.Prompt.Shell: improve 'env' documentation to cover goodgrue's problem
Ignore-this: 7b652a280960cbdf99c236496ca091b0 darcs-hash:20111127231507-f7719-d135757d9c584e50d0cd4112d1a4d2fe87841f91.gz
-rw-r--r--XMonad/Prompt/Shell.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/XMonad/Prompt/Shell.hs b/XMonad/Prompt/Shell.hs
index 8dd151c..49b12f7 100644
--- a/XMonad/Prompt/Shell.hs
+++ b/XMonad/Prompt/Shell.hs
@@ -130,7 +130,9 @@ escape (x:xs)
isSpecialChar :: Char -> Bool
isSpecialChar = flip elem " &\\@\"'#?$*()[]{};"
--- | Ask the shell environment for
+-- | Ask the shell environment for the value of a variable in XMonad's environment, with a default value.
+-- In order to /set/ an environment variable (eg. combine with a prompt so you can modify @$HTTP_PROXY@ dynamically),
+-- you need to use 'System.Posix.putEnv'.
env :: String -> String -> IO String
env variable fallthrough = getEnv variable `catch` econst fallthrough