summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/GF/Command/Commands.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs
index e1a5a3438..e67de95cf 100644
--- a/src/compiler/GF/Command/Commands.hs
+++ b/src/compiler/GF/Command/Commands.hs
@@ -698,8 +698,14 @@ allCommands = Map.fromList [
exec = \_ opts x -> do
let (os,fs) = optsAndFlags opts
trans <- optTranslit opts
- return ((fromString . trans . stringOps (envFlag fs) (map prOpt os) . toString) x),
- options = stringOpOptions,
+
+ if isOpt "lines" opts
+ then return $ fromStrings $ map (trans . stringOps (envFlag fs) (map prOpt os)) $ toStrings x
+ else return ((fromString . trans . stringOps (envFlag fs) (map prOpt os) . toString) x),
+ options = [
+ ("lines","apply the operation separately to each input line, returning a list of lines")
+ ] ++
+ stringOpOptions,
flags = [
("env","apply in this environment only"),
("from","backward-apply transliteration defined in this file (format 'unicode translit' per line)"),