diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,9 @@
+shell-monad (0.6.7) unstable; urgency=medium
+
+  * Fix quoting of empty String/Text.
+
+ -- Joey Hess <id@joeyh.name>  Sat, 22 Dec 2018 16:35:48 -0400
+
 shell-monad (0.6.6) unstable; urgency=medium
 
   * Improvements to build with base-4.12 (MonadFail).
diff --git a/Control/Monad/Shell/Quote.hs b/Control/Monad/Shell/Quote.hs
--- a/Control/Monad/Shell/Quote.hs
+++ b/Control/Monad/Shell/Quote.hs
@@ -30,15 +30,19 @@
 -- The method used is to replace ' with '"'"' and wrap the value inside
 -- single quotes. This works for POSIX shells, as well as other shells
 -- like csh.
+--
+-- The single quotes are omitted for simple values that do not need
+-- any quoting.
 class Quotable t where
 	quote :: t -> Quoted L.Text
 
 instance Quotable L.Text where
 	quote t
-		| L.all (\c -> isAlphaNum c || c == '_') t = Q t
+		| L.all bareable t && L.any bareable t = Q t
 		| otherwise = Q $ q <> L.intercalate "'\"'\"'" (L.splitOn q t) <> q
 	  where
 		q = "'"
+		bareable c = isAlphaNum c || c == '_'
 
 instance Quotable String where
 	quote = quote . L.pack
diff --git a/examples/hello.hs b/examples/hello.hs
--- a/examples/hello.hs
+++ b/examples/hello.hs
@@ -10,3 +10,8 @@
 	cmd "echo" "hello, world"
 	username <- newVarFrom (Output (cmd "whoami")) ()
 	cmd "echo" "from" (WithVar username (<> "'s shell"))
+
+	v <- globalVar "SOMEVAR"
+	ifCmd (test $ TStrEqual v "")
+		(cmd "echo" "Bad")
+		(cmd "echo" "Good")
diff --git a/shell-monad.cabal b/shell-monad.cabal
--- a/shell-monad.cabal
+++ b/shell-monad.cabal
@@ -1,5 +1,5 @@
 Name: shell-monad
-Version: 0.6.6
+Version: 0.6.7
 Cabal-Version: >= 1.8
 License: BSD3
 Maintainer: Joey Hess <id@joeyh.name>
