diff options
-rw-r--r-- | XMonad/Prompt/Shell.hs | 4 |
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 |