[master] d9ccdb7c6 Doc-fixino for vcl.label
Poul-Henning Kamp
phk at FreeBSD.org
Wed Aug 14 08:47:06 UTC 2019
commit d9ccdb7c628c6292c6c58cd1aed57a1e90e2f81d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Aug 14 08:45:51 2019 +0000
Doc-fixino for vcl.label
diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
index 2798eceb6..403ef54f2 100644
--- a/bin/varnishd/mgt/mgt_cli.c
+++ b/bin/varnishd/mgt/mgt_cli.c
@@ -690,6 +690,7 @@ void
mgt_DumpRstCli(void)
{
const struct cli_cmd_desc *cp;
+ const char *p;
int i, j;
qsort(cmds, ncmds, sizeof cmds[0], cli_cmp);
@@ -697,7 +698,10 @@ mgt_DumpRstCli(void)
cp = cmds[i];
if (!strncmp(cp->request, "debug.", 6))
continue;
- printf(".. _ref_cli_%s:\n\n", cp->syntax);
+ printf(".. _ref_cli_");
+ for (p = cp->request; *p; p++)
+ putchar(*p == '.' ? '_' : *p);
+ printf(":\n\n");
printf("%s\n", cp->syntax);
for (j = 0; j < strlen(cp->syntax); j++)
printf("~");
diff --git a/doc/sphinx/users-guide/vcl-built-in-subs.rst b/doc/sphinx/users-guide/vcl-built-in-subs.rst
index 94f62c9da..810ffedad 100644
--- a/doc/sphinx/users-guide/vcl-built-in-subs.rst
+++ b/doc/sphinx/users-guide/vcl-built-in-subs.rst
@@ -110,7 +110,7 @@ of the following keywords:
Switch to vcl labelled *label*. This will continue vcl processing
in this vcl's :ref:`vcl_recv` as if it was the active vcl.
- See the :ref:`varnishadm(1)` ``vcl.label`` command.
+ See the :ref:`ref_cli_vcl_label` command.
.. _vcl_pipe:
@@ -537,8 +537,8 @@ with one of the following keywords:
:ref:`vcl_synth` on the client side is called with ``resp.status``
preset to 503.
-vcl.load / vcl.discard
-----------------------
+During vcl.load / vcl.discard
+-----------------------------
.. _vcl_init:
diff --git a/include/tbl/cli_cmds.h b/include/tbl/cli_cmds.h
index d1b9f2afa..3493736c0 100644
--- a/include/tbl/cli_cmds.h
+++ b/include/tbl/cli_cmds.h
@@ -141,7 +141,9 @@ CLI_CMD(VCL_LABEL,
"vcl.label",
"vcl.label <label> <configname>",
"Apply label to configuration.",
- "",
+ "A VCL label is like a UNIX symbolic link, "
+ "a name without substance, which points to another VCL.\n\n"
+ "Labels are mandatory whenever one VCL references another.",
2, 2
)
More information about the varnish-commit
mailing list