Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Break the response file by line termination rather
Browse files Browse the repository at this point in the history
than spaces, since spaces may be within the parameters.
This simple approach avoids having the need for any
quoting and/or escaping (although a newline char will
not be possible in a parameter and has no escape
mechanism to allow it).
  • Loading branch information
randen committed Jul 30, 2015
1 parent b7fa302 commit 9affe8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ expandResponse :: [String] -> IO [String]
expandResponse = fmap concat . mapM expand
where
expand :: String -> IO [String]
expand ('@':f) = readFileExc f >>= return . filter (not . null) . words
expand ('@':f) = readFileExc f >>= return . filter (not . null) . lines
expand x = return [x]

readFileExc f =
Expand Down

0 comments on commit 9affe8f

Please sign in to comment.