diff options
| author | aarne <aarne@chalmers.se> | 2011-02-28 13:31:04 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2011-02-28 13:31:04 +0000 |
| commit | 0dfbc9b73049ad810d04314b95729511863c3b51 (patch) | |
| tree | a04bd82db982527f6ff9f45494dbdd4eef3cf9df /src/compiler/GF/Command | |
| parent | 66f95c2cb75248b663bbe67821a3fb8f9f12bf88 (diff) | |
the command show_operations to inspect opers in scope
Diffstat (limited to 'src/compiler/GF/Command')
| -rw-r--r-- | src/compiler/GF/Command/Commands.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs index f7a34ee27..0161818f8 100644 --- a/src/compiler/GF/Command/Commands.hs +++ b/src/compiler/GF/Command/Commands.hs @@ -781,6 +781,29 @@ allCommands env@(pgf, mos) = Map.fromList [ "gt | l | sp -command=\"grep \\\"who\\\"\" | sp -command=\"wc\"" ] }), + + ("so", emptyCommandInfo { + longname = "show_operations", + syntax = "so (-grep=STRING)* TYPE?", + synopsis = "show all operations in scope, possibly restricted to a value type", + explanation = unlines [ + "Show the names and type signatures of all operations available in the current resource.", + "This command requires a source grammar to be in scope, imported with 'import -retain'.", + "The operations include the parameter constructors that are in scope.", + "The optional TYPE filters according to the value type.", + "The grep STRINGs filter according to other substrings of the type signatures.", + "This command must be a line of its own, and thus cannot be a part", + "of a pipe." + ], + flags = [ + ("grep","substring used for filtering (the command can have many of these)") + ], + options = [ + ("raw","show the types in computed forms (instead of category names)") + ], + needsTypeCheck = False + }), + ("ut", emptyCommandInfo { longname = "unicode_table", synopsis = "show a transliteration table for a unicode character set", |
