summaryrefslogtreecommitdiff
path: root/src/compiler/GF
diff options
context:
space:
mode:
authorMeowyam <maryam@chilon.net>2021-07-02 16:08:34 +0800
committerMeowyam <maryam@chilon.net>2021-07-02 16:08:34 +0800
commitd53e1713c7860de8a5c256ffe0eed81d5388ae41 (patch)
treea3c5e2b37f91e5dc17caf66ebdcc82e5c71ed434 /src/compiler/GF
parentd5c6aec3ec58b981d702eada8feab6685a0acea4 (diff)
resolves GrammaticalFramework/gf-core/#97
Diffstat (limited to 'src/compiler/GF')
-rw-r--r--src/compiler/GF/Command/CommonCommands.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/GF/Command/CommonCommands.hs b/src/compiler/GF/Command/CommonCommands.hs
index 0b698e79c..578331e65 100644
--- a/src/compiler/GF/Command/CommonCommands.hs
+++ b/src/compiler/GF/Command/CommonCommands.hs
@@ -170,10 +170,13 @@ commonCommands = fmap (mapCommandExec liftSIO) $ Map.fromList [
restrictedSystem $ syst ++ " <" ++ tmpi ++ " >" ++ tmpo
fmap fromString $ restricted $ readFile tmpo,
-}
- fmap fromString . restricted . readShellProcess syst $ toString arg,
+ fmap (fromStrings . lines) . restricted . readShellProcess syst . unlines $ toStrings arg,
flags = [
("command","the system command applied to the argument")
],
+ options = [
+ ("lines","preserve input lines, and return output as a list of lines")
+ ],
examples = [
mkEx "gt | l | ? wc -- generate trees, linearize, and count words"
]