summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Command/CommonCommands.hs
diff options
context:
space:
mode:
authorInari Listenmaa <inari.listenmaa@gmail.com>2021-07-06 09:22:48 +0200
committerGitHub <noreply@github.com>2021-07-06 09:22:48 +0200
commit1b66bf2773b0feda528d3b22fbaf06227a51b864 (patch)
tree19d08fb85d6a228315b7b2a6606f9489c4970ddc /src/compiler/GF/Command/CommonCommands.hs
parent4e8859aa752c65e8445cd54cb6ca80089492fd31 (diff)
parent1e3de38ac4e9d4eee8bb947fb16682490a1130c5 (diff)
Merge pull request #121 from Meowyam/issue97
resolves GrammaticalFramework/gf-core/#97
Diffstat (limited to 'src/compiler/GF/Command/CommonCommands.hs')
-rw-r--r--src/compiler/GF/Command/CommonCommands.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/GF/Command/CommonCommands.hs b/src/compiler/GF/Command/CommonCommands.hs
index 0b698e79c..c685fc525 100644
--- a/src/compiler/GF/Command/CommonCommands.hs
+++ b/src/compiler/GF/Command/CommonCommands.hs
@@ -15,6 +15,7 @@ import GF.Command.Abstract --(isOpt,valStrOpts,prOpt)
import GF.Text.Pretty
import GF.Text.Transliterations
import GF.Text.Lexing(stringOp,opInEnv)
+import Data.Char (isSpace)
import qualified PGF as H(showCId,showExpr,toATree,toTrie,Trie(..))
@@ -170,7 +171,8 @@ 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 . map (dropWhile (=='\n')) $ toStrings $ arg,
+
flags = [
("command","the system command applied to the argument")
],