From d2d15fd4f70da8959d8222229c4e12c85ead8db3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 28 May 2017 16:52:14 +0200 Subject: Add example of doubled single-quoting idiom --- doc/testscript.cli | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/testscript.cli') diff --git a/doc/testscript.cli b/doc/testscript.cli index 189018e..4c585ec 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -1320,6 +1320,17 @@ args = \'&foo\' # '&foo' echo $args # echo &foo \ +To make sure that a string is passed as is through both expansions use the +\i{doubled single-quoting} idiom, for example: + +\ +filter = sed -e \''s/foo (bar|baz)/$&/'\' +$* <>EOO +... +EOI +... +EOO +\ \h1#syntax|Syntax and Semantics| -- cgit v1.1