From bfad1779b3389f8e79e2097298c419ec63b6d43d Mon Sep 17 00:00:00 2001 From: gwern0 Date: Mon, 28 Nov 2011 00:15:07 +0100 Subject: XMonad.Prompt.Shell: improve 'env' documentation to cover goodgrue's problem Ignore-this: 7b652a280960cbdf99c236496ca091b0 darcs-hash:20111127231507-f7719-d135757d9c584e50d0cd4112d1a4d2fe87841f91.gz --- XMonad/Prompt/Shell.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'XMonad/Prompt/Shell.hs') 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 -- cgit v1.2.3