diff --git a/Shellac.cabal b/Shellac.cabal
--- a/Shellac.cabal
+++ b/Shellac.cabal
@@ -1,7 +1,7 @@
 Name:           Shellac
-Cabal-Version:  >= 1.2
+Cabal-Version:  >= 1.2.3
 Build-Type:     Simple
-Version:        0.9.5
+Version:        0.9.5.1
 License:        BSD3
 License-File:   LICENSE
 Author:         Robert Dockins
diff --git a/src/System/Console/Shell/ShellMonad.hs b/src/System/Console/Shell/ShellMonad.hs
--- a/src/System/Console/Shell/ShellMonad.hs
+++ b/src/System/Console/Shell/ShellMonad.hs
@@ -26,6 +26,12 @@
 
 -- * Special actions
 , shellSpecial
+
+
+-- * Extracting and using the shell context
+, ShellContext
+, extractContext, runWithContext, updateCommandResult
+
 ) where
 
 import Control.Monad.Reader
@@ -87,3 +93,23 @@
 instance MonadState st (Sh st) where
   get = getShellSt
   put = putShellSt
+
+-- | The total context held by the shell, with @'CommandResult' st@
+--   being mutable and 'OutputCommand' immutable
+type ShellContext st = (CommandResult st, OutputCommand)
+
+-- | Extract the current shell context for future use, see 'runWithContext'
+extractContext :: Sh st (ShellContext st)
+extractContext = (Sh . StateT) $ \s -> do
+    imC <- ask               
+    return ((s, imC), s)
+
+-- | Run a shell with the supplied context, useful if you need to
+--   invoke a shell within a new IO context, for example when using
+--   'System.Timeout.timeout'
+runWithContext :: ShellContext st -> Sh st a -> IO (a, CommandResult st)
+runWithContext (mC, imC) = (flip runReaderT) imC . (flip runStateT) mC . unSh
+
+-- | Update the mutable context of this shell
+updateCommandResult :: CommandResult st -> Sh st ()
+updateCommandResult s = (Sh . StateT) $ \_ -> return (() , s)
diff --git a/src/System/Console/Shell/Types.hs b/src/System/Console/Shell/Types.hs
--- a/src/System/Console/Shell/Types.hs
+++ b/src/System/Console/Shell/Types.hs
@@ -18,8 +18,9 @@
 -- | Datatype describing the style of shell commands.  This
 --   determines how shell input is parsed.
 data CommandStyle
-   = OnlyCommands            -- ^ Indicates that all input is to be interpreted as shell commands; no
-                             --   input will be passed to the evaluation function.
+   = OnlyCommands            -- ^ Indicates that all input is to be interpreted as shell commands;
+                             --   input is only passed to the evaluation fuction if it cannot be
+                             --   parsed as a command.
    | CharPrefixCommands Char -- ^ Indicates that commands are prefixed with a particular character.
                              --   Colon \':\' is the default character (a la GHCi).
    | SingleCharCommands      -- ^ Commands consist of a single character.
@@ -73,7 +74,7 @@
 --   The type parameter @st@ allows the monad to carry around a package of
 --   user-defined state.
 newtype Sh st a = Sh { unSh :: StateT (CommandResult st) (ReaderT OutputCommand IO) a }
-   deriving (Monad, MonadIO)
+   deriving (Monad, MonadIO, MonadFix, Functor)
 
 ------------------------------------------------------------------------
 -- The shell description and utility functions
