diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+# 1.6.6
+
+* add prependToPath function
+
 # 1.6.5
 
 * expose MonadShControl
diff --git a/shelly.cabal b/shelly.cabal
--- a/shelly.cabal
+++ b/shelly.cabal
@@ -1,6 +1,6 @@
 Name:       shelly
 
-Version:     1.6.5
+Version:     1.6.6
 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
@@ -45,7 +45,7 @@
          , HandleInitializer, StdInit(..), initOutputHandles, initAllHandles
 
          -- * Modifying and querying environment.
-         , setenv, get_env, get_env_text, getenv, get_env_def, get_env_all, get_environment, appendToPath
+         , setenv, get_env, get_env_text, getenv, get_env_def, get_env_all, get_environment, appendToPath, prependToPath
 
          -- * Environment directory
          , cd, chdir, chdir_p, pwd
@@ -749,6 +749,14 @@
   tp <- toTextWarn filepath
   pe <- get_env_text path_env
   setPath $ pe <> T.singleton searchPathSeparator <> tp
+
+-- | prepend the filepath to the PATH env variable
+-- similar to `appendToPath` but gives high priority to the filepath instead of low priority.
+prependToPath :: FilePath -> Sh ()
+prependToPath = traceAbsPath ("prependToPath: " <>) >=> \filepath -> do
+  tp <- toTextWarn filepath
+  pe <- get_env_text path_env
+  setPath $ tp <> T.singleton searchPathSeparator <> pe
 
 get_environment :: Sh [(String, String)]
 get_environment = gets sEnvironment
diff --git a/src/Shelly/Lifted.hs b/src/Shelly/Lifted.hs
--- a/src/Shelly/Lifted.hs
+++ b/src/Shelly/Lifted.hs
@@ -51,7 +51,7 @@
 
 
          -- * Modifying and querying environment.
-         , setenv, get_env, get_env_text, get_env_all, appendToPath
+         , setenv, get_env, get_env_text, get_env_all, appendToPath, prependToPath
 
          -- * Environment directory
          , cd, chdir, chdir_p, pwd
@@ -156,19 +156,19 @@
 instance (Monoid w, MonadSh m) => MonadSh (WriterT w m) where
     liftSh m = WriterT $ do
         a <- liftSh m
-        return (a, mempty)
+        return (a, mempty :: w)
 instance (Monoid w, MonadSh m) => MonadSh (Strict.WriterT w m) where
     liftSh m = Strict.WriterT $ do
         a <- liftSh m
-        return (a, mempty)
+        return (a, mempty :: w)
 instance (Monoid w, MonadSh m) => MonadSh (RWS.RWST r w s m) where
     liftSh m = RWS.RWST $ \_ s -> do
         a <- liftSh m
-        return (a, s, mempty)
+        return (a, s, mempty :: w)
 instance (Monoid w, MonadSh m) => MonadSh (Strict.RWST r w s m) where
     liftSh m = Strict.RWST $ \_ s -> do
         a <- liftSh m
-        return (a, s, mempty)
+        return (a, s, mempty :: w)
 
 instance MonadSh m => S.ShellCmd (m Text) where
     cmdAll = (liftSh .) . S.run
@@ -223,7 +223,7 @@
          => MonadShControl (WriterT w m) where
     newtype ShM (WriterT w m) a = WriterTShM (ShM m (a, w))
     liftShWith f =
-        WriterT $ liftM  (\x -> (x, mempty)) $ liftShWith $ \runInSh -> f $ \k ->
+        WriterT $ liftM  (\x -> (x, mempty :: w)) $ liftShWith $ \runInSh -> f $ \k ->
             liftM WriterTShM $ runInSh $ runWriterT k
     restoreSh (WriterTShM m) = WriterT . restoreSh $ m
     {-# INLINE liftShWith #-}
@@ -233,7 +233,7 @@
          => MonadShControl (Strict.WriterT w m) where
     newtype ShM (Strict.WriterT w m) a = StWriterTShM (ShM m (a, w))
     liftShWith f =
-        Strict.WriterT $ liftM (\x -> (x, mempty)) $ liftShWith $ \runInSh -> f $ \k ->
+        Strict.WriterT $ liftM (\x -> (x, mempty :: w)) $ liftShWith $ \runInSh -> f $ \k ->
             liftM StWriterTShM $ runInSh $ Strict.runWriterT k
     restoreSh (StWriterTShM m) = Strict.WriterT . restoreSh $ m
     {-# INLINE liftShWith #-}
@@ -280,7 +280,7 @@
          => MonadShControl (RWS.RWST r w s m) where
     newtype ShM (RWS.RWST r w s m) a = RWSTShM (ShM m (a, s ,w))
     liftShWith f = RWS.RWST $ \r s ->
-        liftM (\x -> (x,s,mempty)) $ liftShWith $ \runInSh -> f $ \k ->
+        liftM (\x -> (x,s,mempty :: w)) $ liftShWith $ \runInSh -> f $ \k ->
             liftM RWSTShM $ runInSh $ RWS.runRWST k r s
     restoreSh (RWSTShM m) = RWS.RWST . const . const . restoreSh $ m
     {-# INLINE liftShWith #-}
@@ -290,7 +290,7 @@
          => MonadShControl (Strict.RWST r w s m) where
     newtype ShM (Strict.RWST r w s m) a = StRWSTShM (ShM m (a, s, w))
     liftShWith f = Strict.RWST $ \r s ->
-        liftM (\x -> (x,s,mempty)) $ liftShWith $ \runInSh -> f $ \k ->
+        liftM (\x -> (x,s,mempty :: w)) $ liftShWith $ \runInSh -> f $ \k ->
             liftM StRWSTShM $ runInSh $ Strict.runRWST k r s
     restoreSh (StRWSTShM m) = Strict.RWST . const . const . restoreSh $ m
     {-# INLINE liftShWith #-}
@@ -458,6 +458,9 @@
 
 appendToPath :: MonadSh m => FilePath -> m ()
 appendToPath = liftSh . S.appendToPath
+
+prependToPath :: MonadSh m => FilePath -> m ()
+prependToPath = liftSh . S.prependToPath
 
 get_env_all :: MonadSh m => m [(String, String)]
 get_env_all = liftSh S.get_env_all
diff --git a/src/Shelly/Pipe.hs b/src/Shelly/Pipe.hs
--- a/src/Shelly/Pipe.hs
+++ b/src/Shelly/Pipe.hs
@@ -45,9 +45,9 @@
          , (-|-), lastStderr, setStdin, lastExitCode
          , command, command_, command1, command1_
          , sshPairs, sshPairs_
- 
+
          -- * Modifying and querying environment.
-         , setenv, get_env, get_env_text, get_env_def, appendToPath
+         , setenv, get_env, get_env_text, get_env_def, appendToPath, prependToPath
 
          -- * Environment directory
          , cd, chdir, pwd
@@ -338,6 +338,10 @@
 -- | see 'S.appendToPath'
 appendToPath :: FilePath -> Sh ()
 appendToPath = sh1 S.appendToPath
+
+-- | see 'S.prependToPath'
+prependToPath :: FilePath -> Sh ()
+prependToPath = sh1 S.prependToPath
 
 -- | see 'S.cd'
 cd :: FilePath -> Sh ()
