Skip to main content

Escape sequences

Use backslash to escape certain characters.

In a arg default value or a constant value surrounded by double quotes " you can use prefix it with a backslash to escape it into the string. \"

Same goes for action body closing markers. %> is escaped like this: \%>

escape-sequences.cli
escape-sequences(arg-statement: arg? = "Default arg values are surrounded by \"") {

const const-statement = "Constant values are surrounded by \""
action <%
echo Action body is surrounded by <% %\%> &&
echo $(const-statement) &&
echo $(arg-statement)
%>

}