diff --git a/shelly.cabal b/shelly.cabal
--- a/shelly.cabal
+++ b/shelly.cabal
@@ -1,6 +1,6 @@
 Name:       shelly
 
-Version:     1.3.1
+Version:     1.3.2
 Synopsis:    shell-like (systems) programming in Haskell
 
 Description: Shelly provides convenient systems programming in Haskell,
diff --git a/src/Shelly.hs b/src/Shelly.hs
--- a/src/Shelly.hs
+++ b/src/Shelly.hs
@@ -38,7 +38,7 @@
 
 
          -- * Modifying and querying environment.
-         , setenv, get_env, get_env_text, getenv, get_env_def, appendToPath
+         , setenv, get_env, get_env_text, getenv, get_env_def, get_env_all, appendToPath
 
          -- * Environment directory
          , cd, chdir, pwd
@@ -678,6 +678,10 @@
   tp <- toTextWarn filepath
   pe <- get_env_text path_env
   setPath $ pe <> T.singleton searchPathSeparator <> tp
+
+-- | get all the environment variables
+get_env_all :: Sh [(String, String)]
+get_env_all = gets sEnvironment
 
 -- | Fetch the current value of an environment variable.
 -- if non-existant or empty text, will be Nothing
