Skip to content

Commit

Permalink
add note about backslashes
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Nov 28, 2024
1 parent cfaf539 commit 36ee89e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions legacy/documentation/usersguide/objectdefinitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ for otherwise tedious configuration tasks.{{ site.end }}
<ol>
<li>Lines that start with a '#' character are taken to be comments and are not processed</li>
<li>Directive names are case-sensitive</li>
<li>Characters that appear after a semicolon (;) in configuration lines are treated as comments and are not processed</li>
<li>Characters that appear after a semicolon (;) (unless escaped by backslash) in configuration lines are treated as comments and are not processed</li>
</ol>
{{ site.end }}

Expand Down Expand Up @@ -840,7 +840,7 @@ The hostgroup_name may be used instead of, or in addition to, the host_name dire
</td>
</tr>
<tr>
<td valign="top"><strong>service_description;</strong>:</td>
<td valign="top"><strong>service_description</strong>:</td>
<td>
This directive is used to define the description of the service, which may contain spaces, dashes, and colons (semicolons, apostrophes, and quotation marks should be avoided).

Expand Down Expand Up @@ -1857,6 +1857,8 @@ Also, if you want to pass a dollar sign ($) on the command line, you have to esc
</p>
<p><strong>NOTE</strong>: You may not include a <b>semicolon</b> (;) in the <i>command_line</i> directive, because everything after it will be ignored as a config file comment.

It is possible to escape semicolons with a backslash.

You can work around this limitation by setting one of the <a href="macrolist.html#user"><b>$USER$</b></a> macros in your <a
href="configmain.html#resource_file">resource file</a> to a semicolon and then referencing the appropriate $USER$ macro in the <i>command_line</i> directive in place of the semicolon.
</p>
Expand Down

0 comments on commit 36ee89e

Please sign in to comment.