diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-06-12 14:36:03 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-06-12 14:36:03 +0000 |
| commit | 62b04f399cd271f2e1eed783f63e31727f4ddc65 (patch) | |
| tree | ae0e5f6abe1c228082b56141b7698043bc9d2c30 /src-3.0/GF/Command/Commands.hs | |
| parent | 96230f84f5aa6ee4775bdf469010ace7b8a902d5 (diff) | |
added command ps -stringop, with stringop being (un)lexer defined in Lexing
Diffstat (limited to 'src-3.0/GF/Command/Commands.hs')
| -rw-r--r-- | src-3.0/GF/Command/Commands.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src-3.0/GF/Command/Commands.hs b/src-3.0/GF/Command/Commands.hs index 2a15be1c9..231f6db77 100644 --- a/src-3.0/GF/Command/Commands.hs +++ b/src-3.0/GF/Command/Commands.hs @@ -20,6 +20,7 @@ import GF.Infra.UseIO import GF.Data.ErrM ---- import PGF.ExprSyntax (readExp) import GF.Command.Abstract +import GF.Text.Lexing import Data.Maybe import qualified Data.Map as Map @@ -196,6 +197,13 @@ allCommands pgf = Map.fromList [ "example:\n"++ " ph | wf foo.hist -- save the history into a file" }), + ("ps", emptyCommandInfo { + longname = "put_string", + synopsis = "return a string, possibly processed with a function", + exec = \opts -> + return . fromString . maybe id id (stringOp (concatMap prOpt opts)) . toString, + flags = ["cat","lang"] + }), ("q", emptyCommandInfo { longname = "quit", synopsis = "exit GF interpreter" |
