diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,10 @@
+shell-monad (0.6.10) unstable; urgency=medium
+
+  * Quote filenames in redirections as necessary to support spaces
+    and other problem characters.
+
+ -- Joey Hess <id@joeyh.name>  Mon, 07 Mar 2022 14:20:44 -0400
+
 shell-monad (0.6.9) unstable; urgency=medium
 
   * Prepare for monad of no return, by removing redundant return
diff --git a/Control/Monad/Shell.hs b/Control/Monad/Shell.hs
--- a/Control/Monad/Shell.hs
+++ b/Control/Monad/Shell.hs
@@ -340,11 +340,11 @@
 	go (Or e1 e2) = go e1 <> " || " <> go e2
 	go (Redir e r) = let use t = go e <> " " <> t in case r of
 		(RedirToFile fd f) ->
-			use $ redirFd fd (Just stdOutput) <> "> " <> L.pack f
+			use $ redirFd fd (Just stdOutput) <> "> " <> getQ (quote (L.pack f))
 		(RedirToFileAppend fd f) ->
-			use $ redirFd fd (Just stdOutput) <> ">> " <> L.pack f
+			use $ redirFd fd (Just stdOutput) <> ">> " <> getQ (quote (L.pack f))
 		(RedirFromFile fd f) ->
-			use $ redirFd fd (Just stdInput) <> "< " <> L.pack f
+			use $ redirFd fd (Just stdInput) <> "< " <> getQ (quote (L.pack f))
 		(RedirOutput fd1 fd2) ->
 			use $ redirFd fd1 (Just stdOutput) <> ">&" <> showFd fd2
 		(RedirInput fd1 fd2) ->
diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
--- a/Setup.hs
+++ /dev/null
@@ -1,2 +0,0 @@
-import Distribution.Simple
-main = defaultMain
diff --git a/shell-monad.cabal b/shell-monad.cabal
--- a/shell-monad.cabal
+++ b/shell-monad.cabal
@@ -1,6 +1,6 @@
 Name: shell-monad
-Version: 0.6.9
-Cabal-Version: >= 1.8
+Version: 0.6.10
+Cabal-Version: >= 1.10
 License: BSD3
 Maintainer: Joey Hess <id@joeyh.name>
 Author: Joey Hess
@@ -21,6 +21,7 @@
   examples/hello.hs
 
 Library
+  Default-Language: Haskell2010
   GHC-Options: -Wall -fno-warn-tabs
   Exposed-Modules:
     Control.Monad.Shell
