From 3b312e272862f92f696252b43408711c44629223 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 2 Nov 2016 00:09:58 -0700 Subject: [PATCH] Add escape sequences and raw strings to README.md --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index a5ec50d..bad95a8 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,37 @@ publish: rm -rf {{tarball}} {{tardir}} ``` +Double-quoted strings support escape sequences: + +```make +string-with-tab = "\t" +string-with-newline = "\n" +string-with-carriage-return = "\r" +string-with-double-quote = "\"" +string-with-slash = "\\" +``` + +```sh +$ just --evaluate +"tring-with-carriage-return = " +string-with-double-quote = """ +string-with-newline = " +" +string-with-slash = "\" +string-with-tab = " " +``` + +Single-quoted strings do not support any escape sequences: + +```make +raw-string = '\t\n\r\"\\' +``` + +```sh +$ just --evaluate +raw-string = "\t\n\r\"\\" +``` + Recipes may take arguments. Here recipe `build` takes an argument called `target`: ```make