aboutsummaryrefslogtreecommitdiff
path: root/Utility/SafeCommand.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-11-17 17:27:24 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-11-17 17:27:24 -0400
commit6bf2d636864753eff8a5a31b6782f381f195806b (patch)
treedd1efa7378366962b6ee3dc214fa34aac4c0a8e3 /Utility/SafeCommand.hs
parent9ed65a1226cc67000b12d768d6f5e8acaada1c65 (diff)
use intercalate instead of MissingH's join
The two functions are identical.
Diffstat (limited to 'Utility/SafeCommand.hs')
-rw-r--r--Utility/SafeCommand.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Utility/SafeCommand.hs b/Utility/SafeCommand.hs
index 40d41c7a2..5ce17a845 100644
--- a/Utility/SafeCommand.hs
+++ b/Utility/SafeCommand.hs
@@ -14,6 +14,7 @@ import Utility.Process
import Data.String.Utils
import System.FilePath
import Data.Char
+import Data.List
import Control.Applicative
import Prelude
@@ -85,7 +86,7 @@ shellEscape :: String -> String
shellEscape f = "'" ++ escaped ++ "'"
where
-- replace ' with '"'"'
- escaped = join "'\"'\"'" $ split "'" f
+ escaped = intercalate "'\"'\"'" $ split "'" f
-- | Unescapes a set of shellEscaped words or filenames.
shellUnEscape :: String -> [String]