Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
4af83289
Commit
4af83289
authored
Nov 08, 2016
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganize the syntax description in varnish-cli(7)
Ramp up from simple tokens to here documents.
parent
afbc4a2a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
13 deletions
+32
-13
varnish-cli.rst
doc/sphinx/reference/varnish-cli.rst
+32
-13
No files found.
doc/sphinx/reference/varnish-cli.rst
View file @
4af83289
...
@@ -51,30 +51,49 @@ that service. Please see :ref:`varnishd(1)` for details.
...
@@ -51,30 +51,49 @@ that service. Please see :ref:`varnishd(1)` for details.
Syntax
Syntax
------
------
Commands are usually terminated with a newline. Long command can be
The Varnish CLI is similar to another command line interface, the Bourne
entered using shell-style *here document* (here-document or heredoc).
Shell. Commands are usually terminated with a newline, and they may take
The format of here document is::
arguments. The command and its arguments are *tokenized* before parsing,
and as such arguments containing must must be enclosed in double quotes.
It means that command parsing of
::
help banner
is equivalent to
::
"help" banner
because the double quotes only indicate the boundaries of the ``help``
token.
Within double quotes you can escape characters with \\ (backslash). The \\n,
\\r, and \\t get translated to newlines, carriage returns, an tabs. Double
quotes and backslashes themselves can be escaped with \\" and \\\\
respectively.
To enter characters in octals use the \\nnn syntax. Hexadecimals can
be entered with the \\xnn syntax.
Commands may not end with a newline when a shell-style *here document*
(here-document or heredoc) is used. The format of a here document is::
<< word
<< word
here document
here document
word
word
*word* can be any continuous string chosen to make sure it doesn't appear
*word* can be any continuous string chosen to make sure it doesn't appear
naturally in the following *here document*. Often EOF or END is used.
naturally in the following *here document*. Traditionally EOF or END is
used.
When using the here document style of input there are no restrictions
When using the here document style of input there are no restrictions
on length. When using newline-terminated commands maximum length is
on length. When using newline-terminated commands maximum length is
limited by the varnishd parameter *cli_buffer*.
limited by the varnishd parameter *cli_buffer*.
When commands are newline terminated they get *tokenized* before
parsing so if you have significant spaces enclose your strings in
double quotes. Within the quotes you can escape characters with
\\. The \n, \r and \t get translated to newlines, carriage returns and
tabs. Double quotes themselves can be escaped with a backslash.
To enter characters in octals use the \\nnn syntax. Hexadecimals can
be entered with the \\xnn syntax.
Commands
Commands
--------
--------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment