From 354f072c98e9c501dcd9b3a34e8130e6847e6d29 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Wed, 19 Jun 2019 22:21:13 -0500 Subject: [PATCH] DOCS: Add details about the repl to our getting started doc. --- .../site/content/getting-started/_index.md | 21 +++++++++++++++++++ docsite/site/content/reference/expressions.md | 6 +++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/docsite/site/content/getting-started/_index.md b/docsite/site/content/getting-started/_index.md index 215e26d..a3b0763 100644 --- a/docsite/site/content/getting-started/_index.md +++ b/docsite/site/content/getting-started/_index.md @@ -70,6 +70,27 @@ cat sample.yaml UCG will generate the yaml file with the same name as the file containing the out statement. +The UCG repl +------------ + +UCG has a built in repl where you can explore the language interactively. It supports the full +set of UCG expressions and statements. As well as some repl directives that are not part of the +UCG language proper. + +```sh +ucg repl +Welcome to the UCG repl. Ctrl-D to exit +Type '#help' for help. + +1> let foo = "bar"; +"bar" +1> out json {foo="bar"}; +{ + foo = "bar", +} +1> +``` + The UCG command line ----------- diff --git a/docsite/site/content/reference/expressions.md b/docsite/site/content/reference/expressions.md index 43f8525..6cfd2a8 100644 --- a/docsite/site/content/reference/expressions.md +++ b/docsite/site/content/reference/expressions.md @@ -694,9 +694,9 @@ You can experiment with conversion in the repl: ``` > convert json {foo="bar"}; -'{ - "foo": "bar" -}' +"{ + \"foo\": \"bar\" +}" > ```